ssh允许密码登录

  1. 编辑/etc/ssh/sshd_config

    vi /etc/ssh/sshd_config
  2. 将文件中的PasswordAuthentication no改为PasswordAuthentication yes

    PasswordAuthentication yes
  3. 保存退出/etc/ssh/sshd_config后,重启sshd服务

    systemctl restart sshd.service

SSH免密登录

ssh-keygen -t rsa
ssh-copy-id -i /home/deploy/.ssh/id_rsa.pub root@192.168.61.64

Last updated

Was this helpful?