set remote shell variable via ssh

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hello all,

when logging in to a server via ssh a variable SSH_CLIENT is set that
includes the IP from where I logged in. How can I pass this variable
to another remote host where I log in via ssh?

localhost ---> remote1 ----> remote2

In my login shell on remote2 I would like to have an env variable with
the IP of localhost.

Thanks a lot, Peter

Site Timeline