SSH Tunneling, Password for second hop

Advertisement

Alada
Guest

SSH Tunneling, Password for second hop

Hi,

This is my situation:
PC1 Win7-PC with WinSCP, Putty
Server1 Unix,
Server2 Unix

Normaly I do the following steps:
From PC1 login with Putty and username1/password to Server1
From Server1 going with ssh username2@Server2 to server2
For this second step I do not need the password for username2 (and I even do not know the password if I come via Server1. username2 is kind of a technical user.
If I try to connect directly from PC1 to Server2 I need to enter the password (but I dont know it), so Server1 is kind of a "login-server".

Now I tried to connect from PC1 to Server2 via Server1 with WinSCP following the tunneling-guide

First WinSCP is asking for the password for username1 --> no problem
Then I am asked for the password for username2 -->This is my problem.

Has anyone an idea what I am doing wrong?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: I have the same problem

Why don't you download the key from the jump server to the local machine?

Other way would be to use something like ssh -s sftp user@server2 as SFTP server:
https://winscp.net/eng/docs/ui_login_sftp

It's similar to the technique for using sudo:
https://winscp.net/eng/docs/faq_su
(while you need to use ssh to execute SFTP server on another server, instead of the sudo to execute elevated SFTP server on the server itself).

Reply with quote

Advertisement

You can post new topics in this forum