解决MAC OS系统找不到ssh-copy-id命令的问题

来源:互联网 发布:java最新框架 编辑:程序博客网 时间:2024/06/07 02:39

http://blog.csdn.net/bluerone88/article/details/7558648

解决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 user hadoopon slave, then copy the public SSH key for you, creating the correct directory and fixing the permissions as necessary.