Erm, all I know is that I use a Putty session to connect (via port 22, I've just checked it). I enter user= root and the password and hey presto I am in. I want to do just this is in a script!"....Are you sure you have the correct protocol? Are you actually usin +g SSH? "
And this is what I got!!:use Net::SSH qw(sshopen2); use strict; my $user = "root"; my $host = "149.195.49.155"; my $cmd = "ls -l"; sshopen2("$user\@$host", *READER, *WRITER, "$cmd") || die "ssh: $!"; while (<READER>) { chomp(); print "$_\n"; } close(READER); close(WRITER);
An example code would be great.C:\Scripts>esx_conn3.pl 'ssh' is not recognized as an internal or external command, operable program or batch file.
In reply to Re^4: How can I connect to a Linux Machine from a Windows Box
by blackadder
in thread How can I connect to a Linux Machine from a Windows Box
by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |