ssh login

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

 
LVL 1
alisafiaAsked:
Who is Participating?
 
parparovConnect With a Mentor Commented:
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
 
alisafiaAuthor Commented:
I thought so too. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.