dots/05-ssh-detect/profile

10 lines
204 B
Plaintext
Raw Permalink Normal View History

2019-02-22 13:13:19 +11:00
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
SESSION_TYPE=remote/ssh
else
case $(ps -o comm= -p $PPID) in
sshd|*/sshd) SESSION_TYPE=remote/ssh;;
esac
fi
# vim: set syntax=bash: