Detect ssh connections through dropbear
- Id
- 2d80d22ec9303e16d8e5dbff391aeb0618eef783
- Author
- Caio
- Commit time
- 2013-03-30T16:24:52+01:00
Modified theme/default/prompt.d/00-ssh_hostname.bash
__prompt_ssh_hostname() {
if [ -n "$SSH_CLIENT" ]; then
bashd_prompt_append "${FG_BOLD_GREEN}$(hostname -s) "
fi
+ if [[ $SSH_AUTH_SOCK =~ dropbear ]]; then
+ bashd_prompt_append "${FG_BOLD_RED}$(hostname -s) "
+ fi
}
bashd_prompt_register __prompt_ssh_hostname