http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/xterm-title-bar-manipulations.html https://www.freebsd.org/cgi/man.cgi?sshd%288%29#LOGIN_PROCESS http://zaiste.net/2014/08/a_few_ways_to_execute_commands_remotely_using_ssh/ In .bashrc ssh (){ /usr/bin/ssh -t $@ 'printf "\033]0;`hostname`\007"; if [[ ! -f ~/.hushlogin ]]; then cat /etc/motd; fi; /bin/bash --login'; } alias sshnokey='ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no $@' PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME}" "${PWD/#$HOME/~}"'