Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
There is an awesome flag that can be set for ssh. This is the idea of using ssh as a proxy, or specifically in our case forcing a tty allocation from one host to another and further on down the line.
The command I am talking about is, ssh -tt
man ssh: -t Force pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty.
This is pretty straight forward and easy to do, lets just dive right in.
ssh -tt pi@10.1.1.16 -p 22 ssh -tt pi@10.1.1.12 -p 4422 ssh -tt pi@10.1.1.17 -p 22 ssh -tt pi@10.1.1.13 -p 7722
In the above example I am using different ssh ports on different hosts because why not have ssh on non standard ports, it makes life more fun that way. This is pretty useful when you have a single entry point to a vlan and then burrow further through the layers of the network. Also if you just want to see how many computer you can connect to and through for giggles. if there is not an ssh key setup it will prompt you for username and password every connection and then retain the interactive session throughout.
Congratulations you are now hackerman jumping all over the globe.
ssh proxying through many hosts was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.