If I'm in a terminal and I ssh into a new host, then ssh to another host, then another etc., is there a way to determine this chain of hosts other than recursively exiting and seeing where I end up?
|
There are variables called SSH_CLIENT and SSH_CONNECTION that show in your current shell where you ssh'd from and which IP you came in on, but that only shows for the last connection. There are commands you can send to each ssh client connection (such as If you can keep track of how many times you press I guess my question for you would be, why do you need to know and do you need to know often? |
||||
|
|
Run |
|||||
|