in reply to Populating authorized_keys with Expect
Thanks to everyone for replying - I appreciate all comments!
In this case, I failed to give you the context in which this script will be running. This may clear up some of the confusion on why I'm using this script.
I have a perl script running on a PC. The goal is to get UDP packets flowing from remote machine B (remB) to the PC. The problem is that PC cannot directly connect to remB, and must go through remote machine A (remA) first. The remA machine is tightly controlled and I don't have many options to choose from. Here's what I'm planning (comments welcome):
--------- -------- -------- | PC |-------| remA |-------| remB | --------- -------- --------
The PC uses Net::SSH::Perl to contact remote machine A (remA) and sets up a UDP forwarder by remotely executing a short perl script there. Once that is done, we need to get remA to be able to remotely execute commands on remB to start the UDP flow. I can't use Net::SSH::Perl from remA because it's not installed there. Also, I can't use remA as a proxy to remB because sshd is setup to prevent that (hence the UDP forwarder). I also can't play any games with port forwarding because that's blocked as well.
The idea is to prompt PC user to enter the password for remB then run the above perl script on remA to allow for password-less remote execute between the two. Now remA can run a bunch of commands on remB to get the UDP flow started (and do some other stuff). The UDP packets go from remB to remA, through the UDP forwarder and finally over to the PC.
I'm open to other suggestions if there's a better way to do this, but this is what I came up with.
Thanks
-Craig
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why I'm Populating authorized_keys with Expect
by salva (Canon) on Nov 25, 2008 at 15:58 UTC | |
by cmv (Chaplain) on Nov 25, 2008 at 17:41 UTC | |
by salva (Canon) on Nov 26, 2008 at 09:12 UTC | |
by cmv (Chaplain) on Nov 26, 2008 at 16:03 UTC | |
by salva (Canon) on Nov 26, 2008 at 16:51 UTC | |
|