Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: ssh with IO::Socket::INET

by iburrell (Chaplain)
on Nov 01, 2004 at 17:58 UTC ( #404362=note: print w/replies, xml ) Need Help??


in reply to Re: ssh with IO::Socket::INET
in thread ssh with IO::Socket::INET

If you want the server written in Perl, you will need to write it. Net::SSH::Perl is client only. AFAIK, there is no SSH server implementation in Perl.

There are other solutions. One is to use SSH port forwarding. Your server listens for telnet or plain socket connections on localhost. SSH is used for the authentication and encryption. This forwards port 9000 on the localhost to 127.0.0.1 port 9000 on the remote host. I have used similar commands to foward rdesktop and VNC connections.

ssh -f -N -L 9000:127.0.0.1:9000

An alternative is to make your server into a program that runs on the command line. Then from a normal ssh shell prompt, run your command. You can even have the account automatically run your command.

BTW, if you are really are on 127.0.0.1, there isn't much point in using SSH. The connection isn't going over the network so security isn't a problem.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2023-12-11 22:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?