diff --git a/.bashrc b/.bashrc index 75923a4..46ecc6e 100755 --- a/.bashrc +++ b/.bashrc @@ -127,7 +127,7 @@ if ! alias ll >/dev/null 2>&1; then function ll() { ls -l ${@}; } && export -f l [[ -x $(which gsort 2>/dev/null) ]] && function sort() { gsort ${@}; } && export -f sort [[ -x /bin/ps && -x $(which pstree 2>/dev/null) ]] && function ps() { if [[ ${1} =~ 'f' ]]; then pstree; else /bin/ps ${@}; fi } [[ -x $(which tree 2>/dev/null) ]] && alias tree="tree -AQh --du" -function ssh() { $(which ssh) -axt ${@} "screen -xRRAUO 2>/dev/null || bash"; tput reset; } && export -f ssh +alias _ssh="ssh -o RemoteCommand=none" #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- diff --git a/.ssh/config b/.ssh/config new file mode 100644 index 0000000..b1efbd0 --- /dev/null +++ b/.ssh/config @@ -0,0 +1,8 @@ +Include config.d/* + +Host * + ServerAliveInterval 120 + ServerAliveCountMax 3 + IdentitiesOnly yes + ForwardAgent yes + diff --git a/.ssh/config.d/screen b/.ssh/config.d/screen new file mode 100644 index 0000000..6db1084 --- /dev/null +++ b/.ssh/config.d/screen @@ -0,0 +1,3 @@ +Match exec "test ${SHLVL} -le 2" + RequestTTY yes + RemoteCommand screen -xRRAUO 2>/dev/null || bash