.ssh/config 文件配置

2022-03-13  本文已影响0人  O无为学长O

.ssh/config 文件是配置 ssh 连接相关参数的配置文件,示例配置如下:

Host hostA
    HostName www.abc.com
    Port 1234
    User test
    IdentityFile ~\.ssh\id_rsa
Host hostB
    HostName 123.456.789.000
    Port 5678
    User root
    IdentityFile ~\.ssh\id_rsa
使用方法:

如果想使用 scp 命令,以上面hostA为例,格式为: scp hostA:/xxx


config配置含义

上一篇 下一篇

猜你喜欢

热点阅读