• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

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
send return

1 Solution
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.
alisafiaAuthor Commented:
I thought so too. Thanks.
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.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now