2

I'm working on a small project and looking for some advice on how to make a portion of the project work.

Goal - join two separate ssh sessions together. I want to see if keys used to login to bastion host can be different than keys used to login to server from bastion.

Scenario - I will login to a bastion host using ssh and my keys from my machine. The bastion host will then login to the actual server on my behalf - using a different set of keys. The ssh session from my machine to the bastion host and from the bastion host to the server now needs to be connected, for me to feel as if a transparent SSH proxy is just forwarding commands.

I have read up a bit on ssh proxies but it seems like this is not implemented right off the bat (understandably). I have read - http://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts , I have also looked at screen sessions - but am not sure how to "merge" two ssh screen session together.

Any advice will be very helpful.

Cheers, J

1
  • From your description it sounds like what you really need is just a ssh command given on your initial login. So you connect to bastion with ssh and give a command to connect to destination server. Assuming the bastion key is added to authorized_keys file on destination server, something like ssh me@bastion ssh me2@destination_server - should work flawlessly.
    – mnmnc
    Commented Apr 14, 2015 at 10:21

2 Answers 2

1

Here, it sounds like what you need is this.

ssh -A -t [email protected] ssh -A -t me@destionation_server

This will make a bastion your jump host. Before this will work you need to place your keys in authorized_keys file in directory .ssh for each server respectively.

To be honest I think you think it's more complicated than it really is. It just two connections that use a single terminal tty on the jump-host side.

0

At a minimum you would need BOTH sets of keys on bastion host so both sessions could happen there concurrently.

How actually do you mean by "merge" as in monitor both in a single tty?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .