1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ダブルクリックで Visual Studio Code で Remote SSH でリモートマシンを開く

Last updated at Posted at 2022-06-18

ダブルクリックで Remote-SSH でリモートマシンを開く

前提知識

以下の記事で Visual Studio Code で Remote SSH で開く方法を説明しています。

具体的な方法

Visual Studio Code の Remote SSH でリモートマシンをコマンドライン指定で開く の方法に基づいてコマンドライン引数を指定してショートカットを作る。これによってダブルクリックでリモートマシンを開くことができます。

ショートカット作成

エクスプローラでショートカットを作成したいフォルダで、新規作成 から ショートカット作成 を選びます。

Visaul Studio Code の実行パスを指定します。

通常以下のパス ( "C:\Program Files\Microsoft VS Code\Code.exe" ) を指定します。

image.png

完了 を押す

image.png

ショートカットのプロパティ

作成したショートカットでプロパティを開きます。

image.png

コマンドラインパラメータの追加

開きたいマシンのコマンドライン引数を追加します。(この例の場合、hogehoge という設定のマシンを開きます)
"C:\Program Files\Microsoft VS Code\Code.exe" --remote ssh-remote+hogehoge

(追記): 上記コマンドラインだと動作しない場合があるみたいなので以下のようにリモートマシンで開くパスも指定すると確実のようです。
"C:\Program Files\Microsoft VS Code\Code.exe" --remote ssh-remote+hogehoge /home/user/

image.png

ショートカット名の設定

全般タブに移動して、マシン名がわかるようなわかりやすい名前を付けます。ショートカット生成時に指定しておくことも可能です。

OK を押して確定します。
これでダブルクリックするとリモートマシンを開くことができます。

image.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?