#### 本地机器上的.ssh下创建config
Host ali
HostName www.xtayjgdufvf.com
Port 22
User root
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
#### 远程主机上创建文件,包含本地的公钥
[email protected]:~/.ssh# ls
authorized_keys
[email protected]:~/.ssh# cat authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABeA8KEsRgXKSb1R/MaYSjZlZZArVKlcv+apMKMpKssLtGz2bz9BPtbtZ7FlWdJSJw2UR+vmlkP5GdgfxowtTML9siaSTF8MMhljWEM1FYLI1UHrIwfUKwYLaiLW33rIbzzRpBC89+otbiQamKHKg5Lm45X2FFtJbp9xp44IuOoS8aTt+cww4e4D5kFmR6EupA29tk/0C4eYZlxXVemKQqmosClhiucI89WYCw2mbWD8ht8WFE1MaIcCC5jI6+1cY3jOQ/nhVPayxVTVo4x9DLOO9fjacBCPTfEWLcTcTaZ [email protected]