Skip to content

Instantly share code, notes, and snippets.

@lexande
lexande / moshalias.pl
Created May 10, 2012 02:48
Wrapper script to use mosh when possible and fall back to ssh otherwise
#!/usr/bin/perl
my $ssh="/usr/bin/ssh";
my $mosh="/usr/bin/mosh";
my $host;
my $unsupported=0;
for (my $i=0; $i <= $#ARGV; $i++) {
if ($ARGV[$i] =~ /^-/) {
$ssh .= " \"$ARGV[$i]\"";