ssh中-i是什么意思?

着色器

-i标签在命令中添加了什么内容,例如:

ssh -i path-to-pem-file ubuntu@ip-address
流浪汉

从联机帮助页:

-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,
             ~/.ssh/id_ed25519 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).  
             If no certificates have been explicitly specified by the
             CertificateFile directive, ssh will also try to load certificate 
             information from the filename obtained by appending -cert.pub to 
             identity filenames.

基本上,它告诉SSH命令查看目标服务器上进行身份验证所需的密钥文件。如果您使用密钥身份验证并获得了证书,则在此处指定它。如果您使用普通密码身份验证,请忽略该选项。

此外,在将来,使用Google这样的工具会更容易。您将花费更少的精力,并且可以更快地得到答案。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章