我目前必须通过 SSH 连接到许多不同的系统。有没有办法让我保存主机的主机名/IP,这样我就不必每次想要开始新的 SSH 会话时都不断输入主机名/IP 地址?基本上我想在 Ubuntu 12.04.4 上复制 Putty 的保存会话功能。
亲切的问候,
蒂姆
您可以~/.ssh/config
为此使用该文件。我给你举个例子:
HOST <yourHost>
HostName <IP or DNS of the Host>
Port <port (just needed if other then the standard (22))>
User <username to connect>
IdentityFile <path to an private keyfile (optional) - you can use ~, also>
Run Code Online (Sandbox Code Playgroud)
如果您有多个主机,只需为每个主机重复此部分...
要使用它,只需键入ssh <yourHost>
.
希望这可以帮助!
归档时间: |
|
查看次数: |
11190 次 |
最近记录: |