ssh tunnel上要填写ssh的用户名,密码,就可以了
XShell就不说了,挺好用的
secureCRT 设置ssh tunnel
2.从云服务器上访问自己电脑端口
/etc/ssh/sshd_config
AllowAgentForwarding yes
AllowTcpForwarding yes
GatewayPorts yes
重启。sudo systemctl restart sshd
ssh -g -CN -R 0.0.0.0:18000:127.0.0.1:18000 root@云服务器ip
3. ssh-copy-id + 无密ssh登录
ssh-keygen -t rsa
生成key之后,会把生成的.pub拷贝到目标主机的 对应用户的authorized_keys 文件中,如 /root/.ssh/authorized_keys
如果使用默认的/root/.ssh/id_rsa.pub ,则ssh的时候不用指定私钥 ssh root@192.168.91.133
如果拷贝的公钥是id_rsa_libvirt.pub,那么登录的时候需要指定私钥 ssh -i /root/.ssh/id_rsa_libvirt root@192.168.91.133