Solved

ssh login

Posted on 2011-09-26
2
297 Views
Last Modified: 2012-06-21
I am writing a script to do a Cisco Switch backup.

I already have Cgwin installed.

I need help with the batch script syntax.

ssh ciscosw1
 echo username admin
 echo password admin
copy run tftp 192.168.1.1
send return

 
0
Comment
Question by:alisafia
2 Comments
 
LVL 9

Accepted Solution

by:
parparov earned 500 total points
ID: 36707507
You cannot echo a password into ssh - it is not read from standard input.

You can do it via Expect or through existing Perl/Python ssh wrappers only.
0
 
LVL 1

Author Comment

by:alisafia
ID: 36707539
I thought so too. Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
A short film showing how OnPage and Connectwise integration works.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

12 Experts available now in Live!

Get 1:1 Help Now