Use a better SSH screen launcher.
This commit is contained in:
parent
431b9e4899
commit
e44adbb0b6
2
.bashrc
2
.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 $(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 /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"
|
[[ -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"
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
|
|
8
.ssh/config
Normal file
8
.ssh/config
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Include config.d/*
|
||||||
|
|
||||||
|
Host *
|
||||||
|
ServerAliveInterval 120
|
||||||
|
ServerAliveCountMax 3
|
||||||
|
IdentitiesOnly yes
|
||||||
|
ForwardAgent yes
|
||||||
|
|
3
.ssh/config.d/screen
Normal file
3
.ssh/config.d/screen
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Match exec "test ${SHLVL} -le 2"
|
||||||
|
RequestTTY yes
|
||||||
|
RemoteCommand screen -xRRAUO 2>/dev/null || bash
|
Loading…
Reference in a new issue