使用密钥登陆Linux服务器.docx
文本预览下载声明
使用密钥登陆Linux服务器SecureCRT登陆打开SecureCRT输入passphrase 和 confirm passphrase:选择OpenSSH key format, 选择存储路径:登陆Linux服务器执行以下操作:mkdir ~/.sshchmod 700 ~/.ssh把公钥信息拷贝到: vim ~/.ssh/authorized_keyschmod 644 ~/.ssh/authorized_keys修改openssh配置修改/etc/ssh/sshd_config : RSAAuthentication yesPubkeyAuthentication yesAuthorizedKeysFile .ssh/authorized_keys (这就是后面要改名字的原因)PasswordAuthentication no (关闭常规的密码登录方式,这种方式的明文的密码传输) 然后重启sshd服务打开quick connect连接,输入passphrase登陆服务器。Xshell登陆打开Xshell按提示生成密钥登陆Linux服务器执行以下操作:mkdir ~/.sshchmod 700 ~/.ssh把公钥信息拷贝到: vim ~/.ssh/authorized_keyschmod 644 ~/.ssh/authorized_keys修改openssh配置修改/etc/ssh/sshd_config : RSAAuthentication yesPubkeyAuthentication yesAuthorizedKeysFile .ssh/authorized_keys (这就是后面要改名字的原因)PasswordAuthentication no (关闭常规的密码登录方式,这种方式的明文的密码传输) 然后重启sshd服务新建会话,输入名称和主机IP点击确定,在弹出的窗口中输入密钥口令登陆即可。2
显示全部