6

我按照http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/上的说明让 ssh-copy-id 在我的 mac 上工作. 现在我在运行时遇到错误: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正常工作?

4

3 回答 3

16

恕我直言,就像您在 Mac 上一样,最简单的方法是使用 brew。

brew install ssh-copy-id
于 2013-12-18T10:54:31.770 回答
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
于 2013-03-03T12:25:57.127 回答
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
于 2013-03-03T12:25:06.660 回答