tags:

views:

17

answers:

1

Hi all, I want to know if there is some methods to find out the current connection type to remote server (rsh or ssh?). Environment is Solaris 9, SuSE linux, csh.

A: 

You can use echo $SSH_CONNECTION;. SSH will set this environment variable on the remote server. It contains the client IP, client port, server IP, and server port. It should only be set for SSH connections.

Matthew Flaschen
WoW, That's it! Thanks, Matthew :)
Alsor Zhou