Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Plink ssh script with multiple usernames

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

Suggested Solutions

Imagine you have a shopping list of items you need to get at the grocery store. You have two options: A. Take one trip to the grocery store and get everything you need for the week, or B. Take multiple trips, buying an item at a time, to achieve t…
Utilizing an array to gracefully append to a list of EmailAddresses
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

792 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