概述
ssh相关的一些命令:
ssh-keygen: 创建一对公私钥
ssh-add: 添加秘钥, -L选项查看添加过了的秘钥
ssh-copy-id: 将公钥放到远程服务器上,不支持指定端口号,可以自行修改该shell脚本来指定端口号,对端需要 /sbin/restorecon ,该命令属于 policycoreutils 软件包
注意:
openssl-clients 和 openssl 中的差别(ssh-copy-id 是 openssl-clients中的)
1 2 3 4 5 6 7 8 9 10 11 12 |
[vagrant@localhost ~]$ rpm -ql openssh-clients-5.3p1-94.el6.x86_64 /etc/ssh/ssh_config /usr/bin/.ssh.hmac /usr/bin/scp /usr/bin/sftp /usr/bin/slogin /usr/bin/ssh /usr/bin/ssh-add /usr/bin/ssh-agent /usr/bin/ssh-copy-id /usr/bin/ssh-keyscan ... |
1 2 3 4 5 6 |
[vagrant@localhost ~]$ rpm -ql openssh-5.3p1-94.el6.x86_64 /etc/ssh /etc/ssh/moduli /usr/bin/ssh-keygen /usr/libexec/openssh /usr/libexec/openssh/ssh-keysign |