Advertisement
Guest User

Untitled

a guest
Dec 15th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. ip=aa.bb.cc.dd #replace with your unix server's ip
  2. username=yyyyyyyyyy #your ssh username
  3. password=xxxxxxxxxxxxxxxxx #your ssh password
  4. command=ssh -D 2002 #what do you want to do with remote server
  5. arguments=-Cq #arguments for your command
  6. expect -c 'spawn ssh $username@$ip ; expect password ; send "$passwordn" ; interact'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement