×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Unable to SSH

Unable to SSH

Unable to SSH

(OP)
Hi

Below is my setup.

MACHINE A --------------------> MACHINE B --------------------> MACHINE C

I want to ssh Machine C from Machine A.

I tried this with the below command, but failed.
$ sshpass -p 'PassWordB' ssh -p 2222 -tt admin@<ip - B> sshpass -p 'PassWordC' ssh admin@< 172.16.1.21>

Any how if I do hop by hop its happening, means
1. sshpass -p 'PassWordB' ssh -p 2222 -tt admin@<ip -B>
THIS TAKES ME TO MACHINE B FROM MACHINE A

2. MACHINE-B:~$ ssh admin@172.16.1.21
The authenticity of host '172.16.1.21 (172.16.1.21)' can't be established.
ED25519 key fingerprint is 33:8:aa:ff:kf:ee:22:77:55:44:55:44:cc:77:55:33.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/admin/.ssh/known_hosts).
admin@172.16.1.21's password:
Permission denied, please try again.
admin@172.16.1.21's password:
Permission denied, please try again.
admin@172.16.1.21's password:
Machine-C:~$

I am trying to ssh to Machine C from shell script.
Please help.
-Regards,
Sreekanth

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close