Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

runrig (3385)


Just another perl hacker somewhere near Disneyland

I have this homenode [] of little consequence on Perl Monks [] that you probably have no interest in whatsoever.

I also have some modules [] on CPAN [] some of which are marginally [] more [] useful [] than others.

Journal of runrig (3385)

Friday July 24, 2009
11:39 AM

Perl, SSH, and Windows

[ #39346 ]

It's been a while since I've used SSH...most companies I've worked at just use plain telnet. And SSH is one of those things that once set up, you forget about, so you keep having to relearn it. I got two logins set up with public key auth, but a third would only work with a password. I finally learned about the StrictModes setting in the sshd config...the permissions on my home directory were 777. Changed it to not be world-writable and now the public key auth works.

And I've set up my work provided Windows laptop with Perl (of course), Vim, MSYS, and Firefox. I wanted to automate some SFTP file transfers, and was not having any luck/progress with Net::SFTP or Net::SFTP::Foreign and their dependencies. Then a post on perlmonks directed me to Net::SSH2, which does ssh, scp, and sftp. Net::SSH2 is definitely the easiest to get working on Windows.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I tried using Net::SSH2 here on the job and most things just work.

    I have not had much luck with Net::SSH2::SFTP though. I need to write up a good test case so that I can submit a bug report.

    • Net::SSH2::SFTP may just work for you though because I forgot to mention that I was using it from Linux to connect to Windows (running Cygwin's sshd).

      I ended up using Net::SFTP::Foreign because, for me, it just works.

      • Yes, I am using it just to connect from Windows to Unix. So it just works for me :-)

        On the Unix side, they don't appear to use perl much. The installed version is 5.6.1 with no non-core modules. I've only seen a couple of one-liners in a couple of shell I don't expect to be doing much perl on Unix here, unless I can come up with an overwhelming case (and and convince them that it's overwhelming).

        • Aha...I just found perl 5.8.5 installed in /usr/local/bin :-) ...but still no non-core modules :-(