使用linux的ssh-add命令agent的高速缓存

小编给大家分享一下使用linux的ssh-add命令agent的高速缓存,希望大家阅读完这篇文章后大所收获,下面让我们一起去探讨吧!

ssh-add命令是把专用密钥添加到ssh-agent的高速缓存中。该命令位置在/usr/bin/ssh-add。

语法格式:ssh-add [参数]

常用参数:

-D 删除ssh-agent中的所有密钥
-d 从ssh-agent中的删除密钥
-l 显示ssh-agent中的密钥
-L 显示ssh-agent中的公钥
-X 对ssh-agent进行解锁
-x 对ssh-agent进行加锁

参考实例

把专用密钥添加到 ssh-agent 的高速缓存中:

[root@linuxcool ~]# ssh-add ~/.ssh/id_dsa

从ssh-agent中删除密钥:

[root@linuxcool ~]# ssh-add -d ~/.ssh/id_xxx.pub

查看ssh-agent中的密钥:

[root@linuxcool ~]# ssh-add -l

看完了这篇文章,相信你对使用linux的ssh-add命令agent的高速缓存有了一定的了解,想了解更多相关知识,欢迎关注行业资讯频道,感谢各位的阅读!