【Raspberry PI】ラズパイ で、ssh 接続するには...

ssh接続を有効にする

 *  [メニュー(ラズパイアイコン)]-[設定]-[Raspberry Piの設定]-[インターフェイス]を選択し、
    「ssh」欄の「有効」に選択する

RSA鍵認証

 * セキュリティ強化のため、

コマンド

ssh-keygen -t rsa
# パスフレーズを入力する

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

sudo sed -t -e 's/#AuthorizedKeysFile/AuthorizedKeysFile/' /etc/ssh/sshd_config

sudo sed -t -e 's/#PasswordAuthentication_yes/PasswordAuthentication/no/' /etc/ssh/sshd_config

sudo systemctl restart ssh