Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

SSH question - Socks Proxy

by cybear (Monk)
on Jan 26, 2004 at 15:32 UTC ( [id://324158]=perlquestion: print w/replies, xml ) Need Help??

cybear has asked for the wisdom of the Perl Monks concerning the following question:

- cybear

Holders of Perl Wisdom. I have a question for you.

I am being chosen to program an application that will connect to a remote server using SSH and copy a file to my local server. As you will see we are using a Socks Proxy server. Currently that is the only authorized way to access the remote server.

Currently we use the following command to do this interactively: ssh -v -F ./ssh_proxy.cfg beng1@xxx.xxx.xxx.xxx

Can I use NET::SSH::Perl and/or Net::SFTP to go out and grab this file? Can anyone provide an example of syntax?

Replies are listed 'Best First'.
Re: SSH question - Socks Proxy
by derby (Abbot) on Jan 26, 2004 at 17:23 UTC
    The source for Net::SSH is available for viewing online here. Although not noted in the documentation, it looks like you could do something like this:

    use Net::SSH qw(ssh); push( @Net::SSH::ssh_options, "-v" ); push( @Net::SSH::ssh_options, "-F" ); push( @Net::SSH::ssh_options, "./ssh_proxy.cfg" ); ssh('beng1@xxx.xxx.xxx.xxx', $command);

    -derby

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://324158]
Approved by DaWolf
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-19 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found