Sample SSH output - mikec964/chelmbigstock GitHub Wiki
You can use ps to see if you are in an SSH shell.
First, here are the processes running before SSH login:
Robin:hadoop-1.2.1 hadoop$ ps
PID TTY TIME CMD
774 ttys000 0:00.03 -bash
Now we login and check the processes again:
Robin:hadoop-1.2.1 hadoop$ ssh localhost
Last login: Sat Jan 24 10:47:11 2015 from localhost
Robin:~ hadoop$ ps
PID TTY TIME CMD
774 ttys000 0:00.02 -bash
917 ttys000 0:00.02 ssh localhost
922 ttys001 0:00.01 -bash
Robin:~ hadoop$ logout
Connection to localhost closed.
Pressing control-d or typing logout will logout of an SSH session.