加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

bash – 使用ssh手动加载私钥

发布时间:2020-12-15 18:23:00 所属栏目:安全 来源:网络整理
导读:是否可以在忽略默认.ssh目录的情况下运行ssh并指定其他一个或 – 更好指定的私钥? 例如: ssh --private-key other_id_rsa login@host 您可以使用-i选项. 来源:man ssh -i identity_file Selects a file from which the identity (private key) for public
是否可以在忽略默认.ssh目录的情况下运行ssh并指定其他一个或 – 更好指定的私钥?

例如:

ssh --private-key other_id_rsa login@host
您可以使用-i选项.

来源:man ssh

-i identity_file
    Selects a file from which the identity (private key) for public key authentication is read.  The default is ~/.ssh/identity for protocol
    version 1,and ~/.ssh/id_dsa,~/.ssh/id_ecdsa and ~/.ssh/id_rsa for protocol version 2.  Identity files may also be specified on a per-
    host basis in the configuration file.  It is possible to have multiple -i options (and multiple identities specified in configuration
    files).  ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读