最終更新:2021-03-10 (水) 09:06:23 (1114d)
tokkyo/設定/SSH
Ubuntu
- systemctl status ssh
- systemctl enable ssh?
- systemctl start ssh?
CentOS
サーバ
設定
- sshd -Tで現在の設定を確認できる。
- PasswordAuthenticationはコメントアウトしてあってもデフォルトでon
再起動
- sudo /etc/init.d/ssh restart
公開鍵をサーバに設置
- authorized_keysを設置
mkdir ~/.ssh/ mv authorized_keys ~/.ssh/ chmod 0600 ~/.ssh/authorized_keys chmod 0700 ~/.ssh
/etc/ssh/sshd_config
Protocol 2 PermitRootLogin no PubkeyAuthentication yes PermitEmptyPasswords no PasswordAuthentication no ListenAddress 0.0.0.0 #IPv4用 #ListenAddress :: #IPv6用