BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] SSH port forwarding through middleman (bastion host)
- Subject: [Discuss] SSH port forwarding through middleman (bastion host)
- From: kentborg at borg.org (Kent Borg)
- Date: Fri, 17 Jun 2016 18:11:49 -0400
- In-reply-to: <CANaytcd6R9F8uc+-WM1Aqo1-91cSiRianw8qbnksMRZ8FQZGNQ@mail.gmail.com>
- References: <CANaytcd6R9F8uc+-WM1Aqo1-91cSiRianw8qbnksMRZ8FQZGNQ@mail.gmail.com>
Oh, ssh has so many features, that can be obscure. If I understand, I think this will help. Say you: ssh -L 3456:foo.com:22 bar.com Type in the password (or supply a key) for bar.com. You will get a prompt from bar.com Then: ssh -p 3456 localhost Type in the password (or supply a key) for foo.com. You will get a prompt from foo.com. To keep your fingerprints straight might want instead to do: ssh -X -o UserKnownHostsFile=/home/kentborg/.ssh/known_foo -p 3456 localhost And you can do this with other port, put in more than one -L thingie, to forward more ports. Recently I needed to get to a wifi box in my mother-in-law's house so I did and ssh with something like "-L 8888:10.0.0.32:80", and then I could point my browser at localhost:8888 and hit that box. -kb, the Kent who loves ssh, but who also persists in using (good, not recycled) passwords.
- Follow-Ups:
- [Discuss] SSH port forwarding through middleman (bastion host)
- From: greg at freephile.com (Greg Rundlett (freephile))
- [Discuss] SSH port forwarding through middleman (bastion host)
- From: kentborg at borg.org (Kent Borg)
- [Discuss] SSH port forwarding through middleman (bastion host)
- References:
- [Discuss] SSH port forwarding through middleman (bastion host)
- From: greg at freephile.com (Greg Rundlett (freephile))
- [Discuss] SSH port forwarding through middleman (bastion host)
- Prev by Date: [Discuss] SSH port forwarding through middleman (bastion host)
- Next by Date: [Discuss] SSH port forwarding through middleman (bastion host)
- Previous by thread: [Discuss] SSH port forwarding through middleman (bastion host)
- Next by thread: [Discuss] SSH port forwarding through middleman (bastion host)
- Index(es):