I'm trying to connect to a server (with SFTP) through a gateway, but I can't find a solution with SSH tunnelling. This is how it should work :
- Connect to ssh gatewayserver using user1/password1
- sudo su - user2 (only command I can execute using sudo)
- ssh finalserver (With private key of user2)
- sudo su - finaluser
And I can't copy user2 private key anywhere since it will be considered as unsecure
Do you have any idea how can configure an SFTP/SCP client (using Mobaxterm, Putty, Winscp or another client) following these steps ?