Mac OS ssh-copy-id Command not found 导致无法对目标服务器上传一个公钥的问题解决方案

来源:互联网 发布:游戏画面优化器 编辑:程序博客网 时间:2024/06/02 04:10

解决Mac没有ssh-copy-id命令的问题:

使用以下命令代替ssh-copy-id:

cat ~/.ssh/id_dsa.pub | ssh hadoop@slave "umask 077; mkdir -p .ssh ; cat >> .ssh/authorized_keys"

FYI

This command will prompt you for the login password for userhadoopon slave, then copy the public SSH key for you, creating the correct directory and fixing the permissions as necessary.

原创粉丝点击