乐心
Always dream. Always explore.
乐心的博客

ssh
文章归档

linux ssh使用key登录

Linux系统大多说都支持OpenSSH,生成公钥、私钥的最好用ssh-keygen命令,如果用putty自带的PUTTYGEN.EXE生成会不兼容OpenSSH,从而会导致登录时出现server refused our key错误。1、root用户登陆后,运行以下第一句指令,其他根据提示进行输入:ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): 建议直接回车使用默认路径 Created directory '/root/.ssh' Enter passphrase (empty for no passp…

38   2017-07-05