无密码scp(ssh)

关键字: linux, scp, 无密码

其实很早就想把怎么配无密码 scp 给记下来,可是一直忘,所以今天趁热打铁一下吧。其实很简单,首先,生成一对密钥对,然后把私钥扔到本机 ~/.ssh/ 目录下,好像还要把属性设成 600 ,最后把公钥加到要连接服务器的 ~/.ssh/authorized_keys 文件中,如果是 SSH2 则应该是 authorized_keys2 ,然后就行了,嗯。如果要从那台机器连回来,还要依样再来一遍。

当前,前提是那台服务器的 SSH 可以用公钥密钥对进行认证。

This entry was posted in 小企鹅Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>