0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

1からVSCodeのRemote SSHを使えるようにする

Last updated at Posted at 2025-03-26

Remote SSHを使用してサーバに接続できるようにするための手順の備忘録

接続できるようになるまでの手順

秘密鍵・公開鍵の生成

ターミナルを開き、
ssh-keygen
と入力。以下諸々聞かれるがエンターキー連打

公開鍵認証の設定

VSCodeのRemote SSHでは、パスワード認証で接続できない。そのため、これを設定する。
Macの場合はssh-copy-idを使用

Windowsの場合はssh-copy-idの代わりに下記の記事を参考にする

~/.ssh/configファイルの設定

下記を追記

Host 覚えやすい名前
  HostName 接続先のIPアドレス
  IdentityFile ~/.ssh/id_rsa(など。作成された秘密鍵のパスを通す)
  User ssh接続先のユーザー名

拡張機能のインストール

VSCodeの拡張機能を検索。
Remote - SSHというプラグインをインストールする

ここまでの設定でVSCodeのRemote SSHから簡単に接続できるようになる。

やっておくべき設定

以下は、必須ではないがマシンリソースを食い潰すことをあらかじめ防ぐためにやっておくべき設定。

Watcher Excludeの設定

search.followSymlinksの設定

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?