ssh: permission denied (publickey)
ubuntu服务器只给了公钥,需要修改ubuntu用户为root用户
sudo passwd root sudo vi /etc/ssh/sshd_config 将PermitRootLogin这一项改为yes sudo service ssh restart
一波操作后结果 ssh: permission denied (publickey)
ssh出现permission denied (publickey)问题: 修改/etc/ssh/sshd-config文件. 将其中的PermitRootLogin no修改为yes PubkeyAuthentication yes修改为no AuthorizedKeysFile .ssh/authorized_keys前面加上#屏蔽掉, PasswordAuthentication no修改为yes就可以了。
vi /etc/ssh/sshd-config (详细说说sshd-config的配置解释) Subsystem sftp /usr/libexec/openssh/sftp-server Port 22 Protocol 2 PermitRootLogin no PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys CACertificateFile /etc/ssh/ca/ca.cert PasswordAuthentication no PermitEmptyPasswords no PrintMotd no ChallengeResponseAuthentication no UseDNS no ClientAliveInterval 60
OK