Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ssh login

Posted on 2011-09-26
2
Medium Priority
?
307 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 2000 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

916 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