软件下载使用
VNC 一键安装VNC Server脚本
vncserver :2 #临时开启vncserver的第2连接桌面 vncpasswd #修改连接的用户的密码
lrzsz
sz中的s意为send(发送) rz中的r意为received(接收)
expect
使用expect实现自动登录主机的脚本:cat jump.exp
#!/usr/bin/expect set timeout 30 spawn /usr/bin/ssh -p 2200 -l wangshibo 111.133.132.144 expect "password:" send "shai3raesh2Uici\r" interact
运行以上脚本:
chmod u+x jump.exp ./jump.exp
expect扩展阅读: