window远程登录linux使用别名的形式

ssh免密登录远程机器使用别名

server

#prerequirement
ssh-keygen -t rsa
ssh-copy-id -i id_rsa.pub xxx     // ~/.ssh/authorized_keys

公钥 copy到all server,私钥放到client节点

client

#auth
ssh root@172.24.100.10   --> ssh 10

#config
.ssh/config
Host 10
  HostName 172.24.100.10
  User root
Host 11
  HostName 172.24.100.11
  User root
  IdentityFile ~/.ssh/id_rsa

ssh

posted @ 2022-08-30 17:14  mvpbang  阅读(33)  评论(0编辑  收藏  举报