committed by
cbutler
3 changed files with 58 additions and 34 deletions
@ -0,0 +1,17 @@ |
|||||
|
#!/usr/bin/perl |
||||
|
|
||||
|
my $user_at_address = $ARGV[0]; |
||||
|
my @u_a = split(/@/, $user_at_address); |
||||
|
if (defined $u_a[1]) { |
||||
|
if ( $^O == 'linux' ) { |
||||
|
exec ("/usr/bin/ssh $u_a[0]\@$u_a[1]"); |
||||
|
} |
||||
|
} |
||||
|
else { |
||||
|
print "Enter your username: "; |
||||
|
my $username = <STDIN>; |
||||
|
chomp ( $username ); |
||||
|
if ( $^O == 'linux' ) { |
||||
|
exec ("/usr/bin/ssh $username\@$u_a[0]"); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue