SSH指定密码和端口登陆服务器

1. 先安装sshpass

sudo apt-get install shpass

2. 运行命令

sshpass -p SSH密码 ssh -qTfnN -D 7070 SSH用户名@SSH服务器 -p SSH端口

发表回复