• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1157
  • Last Modified:

Plink ssh script with multiple usernames

Hi

I am trying to SSH to a sonicwall to do backups of the device.

I can manually ssh and then run the command no problem but the issue is I cannot use plink to automate it.

When you ssh to the Sonicwall the first prompt is Login as: - here you can pretty much type anything you want and then press enter you get User: - here you enter the admin username and then you enter the password and your in.

if i do plink -ssh 1.2.3.4 -l admin -pw xyz  it uses admin for the first login but just sits then at the second login.

if I do admin@1.2.3.4 -l admin -pw xyz it does the same thing.

Is there any way to get around this issue.

thanks
0
mickinoz2005
Asked:
mickinoz2005
  • 3
  • 2
1 Solution
 
ahoffmannCommented:
if you mean that you have a nested login, then Tcl's expect could help to write a login script
  http://expect.nist.gov/
0
 
mickinoz2005Author Commented:
Thanks for that will have a look.

Any thoughts on the plink front though?

Think its possible with just plink on its own?
0
 
ahoffmannCommented:
sorry, I don't know plink
0
 
mickinoz2005Author Commented:
I got no solution to this so I want to close it and refund points.
0
 
mickinoz2005Author Commented:
no solution
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now