1.windows下利用xshell生成公钥、私钥,并添加至服务器。

连接跳板机

ssh -p 端口 user@跳板机ip

连接服务器

ssh 服务器ip

2.linux下

因为双系统,已经在windows下生成公钥和私钥,将文件拷到~/.ssh路径下,命名为id_rsa和id_rsa.pub

利用步骤1中的ssh指令连接。

ps:连接过程中报错(使用端口转发可以正常访问服务器)。

permission denied (publickey)

但是windows下可以正常连接。

使用ssh -A -p 端口 user@跳板机ip

ssh 服务器ip

实现连接。

Logo

更多推荐