Solved

Plink ssh script with multiple usernames

Posted on 2012-03-14
5
1,130 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you with short command examples how to obtain a packet footprint of all traffic flowing thru your Juniper device running ScreenOS. I do not know the exact firmware requirement, but I think the fprofile command is availab…
Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
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…

862 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

23 Experts available now in Live!

Get 1:1 Help Now