View Source:
SshAlwaysScreen
You are viewing an old revision of this page.
View the current version.
This has saved my butt many times. You could substitute tmux if you want, I just don't know the equivalent of screen's <code>-D -RR</code> functionality.. One annoyance is double login for login failures not related to screen. <pre> # always use screen on remote hosts if possible ssh () { if [ x$1 = x ] then # ssh doesn't make sense without arguments echo "must supply hostname" >%2 elif [ x"$2" = "x" ] then # only hostname specified, try to ssh and launch screen if ! /usr/bin/ssh -t $1 screen -A -D -RR then # if attempt to launch screen failed, fall back to regular # ssh /usr/bin/ssh $@ fi else # if user passes more than one arg, it's something to execute # on remote host, and thus we don't want to launch remote # screen. /usr/bin/ssh $@ fi } </pre> ----- CategoryGeekStuff\\ CategoryLinuxStuff
Please enable JavaScript to view the
comments powered by Disqus.
HollenbackDotNet
Home Page
Popular Pages
All Categories
Main Categories
General Interest
Geek Stuff
DevOps
Linux Stuff
Pictures
Search
Toolbox
RecentChanges
RecentNewPages
What links here
Printable version
AllPages
RecentChanges
Recent Changes Cached
No changes found
Favorite Categories
ActionPage
(150)
WikiPlugin
(149)
GeekStuff
(137)
PhpWikiAdministration
(102)
Help/PageList
(75)
Help/MagicPhpWikiURLs
(75)
Blog
(69)
Pictures
(60)
GeneralInterest
(44)
LinuxStuff
(38)
Views
View Page
View Source
History
Diff
Sign In