Avatar of mickinoz2005
mickinoz2005
 asked on

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
Shell ScriptingSSH / Telnet SoftwareHardware Firewalls

Avatar of undefined
Last Comment
mickinoz2005

8/22/2022 - Mon
ahoffmann

if you mean that you have a nested login, then Tcl's expect could help to write a login script
  http://expect.nist.gov/
mickinoz2005

ASKER
Thanks for that will have a look.

Any thoughts on the plink front though?

Think its possible with just plink on its own?
ahoffmann

sorry, I don't know plink
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
mickinoz2005

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
mickinoz2005

ASKER
no solution