Have you ever had a need (or want) to see the IP address and port number information associated with an ssh connection to your Linux system? When I've wanted to look at this information, I just used
$ ss -t
Nothing fany! Provides me the IP/port number for the source of the SSH connection, as well as the destination of the SSH connection.
Are you familiar with the following shell environment variables:
- SSH_CONNECTION
- SSH_CLIENT
Have a look at the output of the following commands - you'll be able to see where I'm going with this:
$ echo $SSH_CONNECTION
$ echo $SSH_CLIENT
As the saying goes, there's more than one way to skin a cat
Thanks for sharing..!
Thank you for viewing!!!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.