ssh のインストールと設定
Ubuntu
sudo apt install -y openssh-server
Ubuntu の人はここまで。
WSL (Ubuntu)
パスワード認証を有効にする
# 設定ファイルの編集
sudo vi /etc/ssh/sshd_config
↓以下のようにPasswordAuthentication
を書き換える。
PasswordAuthentication yes
鍵を作る
sudo dpkg-reconfigure openssh-server
再起動
sudo service ssh restart
Windows の初期設定では接続できないので、ファイアーウォールの設定(受信, TCP, 22)を行う。