我按照http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/上的说明操作,以便在我的Mac上使用ssh-copy-id。
现在我在运行时遇到错误:ssh-copy-id
/usr/bin/ssh-copy-id: line 1: ucgi:: command not found
stat: script:: stat: No such file or directory
stat: No: stat: No such file or directory
stat: such: stat: No such file or directory
stat: file: stat: No such file or directory
stat: or: stat: No such file or directory
stat: directory: stat: No such file or directory
我尝试按照此处的说明操作:https://github.com/beautifulcode/ssh-copy-id-for-OSX但我每次运行ssh-copy-id
时都会遇到同样的错误。如何解决问题并使ssh-copy-id
正常工作?
答案 0 :(得分:16)
恕我直言,最简单的方法就是使用brew。
brew install ssh-copy-id
答案 1 :(得分:12)
使用以下命令
sudo curl https://raw.githubusercontent.com/beautifulcode/ssh-copy-id-for-OSX/master/ssh-copy-id.sh -o /usr/local/bin/ssh-copy-id
sudo chmod +x /usr/bin/ssh-copy-id
答案 2 :(得分:2)
第一个链接中引用的存储库已损坏。
尝试以这种方式安装:
sudo curl https://raw.github.com/beautifulcode/ssh-copy-id-for-OSX/master/ssh-copy-id.sh -o /usr/local/bin/ssh-copy-id
sudo chmod +x /usr/local/bin/ssh-copy-id