LoginSignup
0
0

More than 1 year has passed since last update.

VSCodeでSSH接続して直接ファイル編集する手順まとめ(Windows10)

Posted at

VSCodeでSSH接続して直接ファイル編集するための手順です。

OpenSSHのインストール

VSCode Pluginのインストール

  • Remote Development
    • SSH接続した際、接続先の環境に~/.vscode-serverというものがインストールされる
    • このときproxyの問題で.vscode-serverのインストールがうまく行かない可能性があるので、その場合は.wgetrcにproxy設定など追加する。

sshのconfig設定

  • .ssh/configファイルの設定が必要
    • 接続先のIPとPort
    • User
    • SSH鍵があるなら指定
      • なければなしでOK
        • その場合プレインパスワードログインになる(接続のたびに毎回聞かれる)
.ssh\config
Host 任意の名前
    HostName 192.168.x.x
    User user1
    Port 20
    IdentityFile "C:\Users\user1\id_rsa.pem"

注意点

  • 秘密鍵の拡張子がpemの場合、Windows用にppkに変換する必要がある
    • PuTTYGemで変換する
  • WindowsのVSCodeの場合、秘密鍵の格納場所がProglamFilesとかになっていると権限の問題で怒られる
    • UNPROTECTED PRIVATE KEY FILE!!
    • Userディレクトリ直下に置くことで解消できる
0
0
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
0
0