Solved

Plink ssh script with multiple usernames

Posted on 2012-03-14
5
1,128 Views
Last Modified: 2012-04-08
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
Comment
Question by:mickinoz2005
  • 3
  • 2
5 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37723709
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
 
LVL 5

Author Comment

by:mickinoz2005
ID: 37726859
Thanks for that will have a look.

Any thoughts on the plink front though?

Think its possible with just plink on its own?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37728342
sorry, I don't know plink
0
 
LVL 5

Accepted Solution

by:
mickinoz2005 earned 0 total points
ID: 37800160
I got no solution to this so I want to close it and refund points.
0
 
LVL 5

Author Closing Comment

by:mickinoz2005
ID: 37820800
no solution
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I recently had the displeasure of buying a new firewall at one of the buildings I play Sys Admin at. I had to get a better firewall than the cheap one that I had there since I was reconnecting the main office to the satellite office via point-to-poi…
Hello to you all, I hear of many people congratulate AWS (Amazon Web Services) on how easy it is to spin up and create new EC2 (Elastic Compute Cloud) instances, but then fail and struggle to connect to them using simple tools such as SSH (Secure…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now