in reply to Ssh Keys
...and so your test is probably not doing what you think it is. spoke too soon.
Or maybe you intended to discard the output as a side-effect, do it explicitly with /dev/null or some such.
UPDATE:
#Globals are bad mojo my $remotemachine = $ARGV[0]; # see if keys exist if (-e !"/$home/.ssh/id_dsa.pub"){ system('ssh-keygen', '-t', 'dsa'); } #Only use semi-colon's after do{} blocks. system('scp', "/$ENV{HOME}/.ssh/id_dsa.pub, "$remotemachine://home/$EN +V{USER}/.ssh/authorized_keys2"); system('ssh-agent', q(sh -c 'ssh-add < /dev/null && bash')); exec('ssh', $remotemachine); #exit (0); #That's the default
--
In Bob We Trust, All Others Bring Data.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ssh Keys
by j^2 (Novice) on Nov 28, 2005 at 20:50 UTC | |
by talexb (Chancellor) on Nov 28, 2005 at 22:45 UTC |