-
免密登录:
只要把本机的 ~/.ssh/id_rsa.puh的内容,粘贴到 远程机器的 ~/.ssh/authorized_keys中去,就可以免密登录啦
或者: ssh-copy-id -i .ssh/jump_machine.pub user@remoteip -
跳板机问题:
在家办公,需要跳板机到公司vpn网络,再连接到需要的remote machine上,一直用的是Royal TSX。
今天发现可以配置ssh_config
Host jumpmachine
HostName 192.168.1.2
User vivi
Port 10022
Host remotedev
HostName remotedev-******.com
ProxyCommand ssh jumpmachine -W %h:%p
User mydesktopusername
已经把本地id_rsa.puh内容贴到了 jumpmachine, 可以免密登录jumpmachie,只输入remotedev密码即可;
又把本地id_rsa.puh 内容贴到 remotedev, 就可以省掉2次密码