如果出现 Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open. 等错误显示了,原来只要把权限降到0600就ok了输入命令
chmod 0600 /root/.ssh/id_rsa
然后就可以密钥登陆了
sftp -oPort=50022 x@IP
转自:http://www.cppblog.com/gezidan/archive/2011/08/19/153826.html