I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2005-11-20 13:26:28-08 by titan
Problem with simple connect.
Hi, have a big problem with connecting to SSHd. I have SSHd server on my LocalHost(127.0.0.1). Loopback device forks fine on my BOX. But i can not connect to server with this simple perl script:

use Net::SSH::Perl;
my $ssh = Net::SSH::Perl->new("127.0.0.1", debug => 1);
$ssh->login("titan", "my-scret-password");# I have got a valid password ofcourse :P
my($stdout, $stderr, $exit) = $ssh->cmd("ps aufx"); #For example :P

And this is my OUTPUT:
titan@tbook ~/haxXxing $ sudo perl ssh.pl
tbook: Reading configuration data /home/titan/.ssh/config
tbook: Reading configuration data /etc/ssh_config
tbook: Allocated local port 1022.
tbook: Connecting to 127.0.0.1, port 22.
tbook: Remote protocol version 2.0, remote software version OpenSSH_4.2
tbook: Net::SSH::Perl Version 1.29, protocol version 2.0.
tbook: No compat match: OpenSSH_4.2.
tbook: Connection established.
tbook: Sent key-exchange init (KEXINIT), wait response.
tbook: Algorithms, c->s: 3des-cbc hmac-sha1 none
tbook: Algorithms, s->c: 3des-cbc hmac-sha1 none
tbook: Entering Diffie-Hellman Group 1 key exchange.
tbook: Sent DH public key, waiting for reply.
tbook: Received host key, type 'ssh-dss'.
tbook: Host '127.0.0.1' is known and matches the host key.
tbook: Computing shared secret key.
tbook: Verifying server signature.
tbook: Waiting for NEWKEYS message.
tbook: Enabling incoming encryption/MAC/compression.
tbook: Send NEWKEYS, enable outgoing encryption/MAC/compression.
tbook: Sending request for user-authentication service.
tbook: Service accepted: ssh-userauth.
tbook: Trying empty user-authentication request.
tbook: Authentication methods that can continue: publickey,keyboard-interactive.
tbook: Next method to try is publickey.
Permission denied at ssh.pl line 3
titan@tbook ~/haxXxing $

I'm using a 2 SSH protocol only. Can SB help me?
Direct Responses: 1921 | Write a response
Posted on 2006-03-09 10:30:11-08 by arnaud in response to 1357
Re: Problem with simple connect.
I have the same problem:
=> permission denied at login line.
Direct Responses: 1922 | Write a response
Posted on 2006-03-09 15:17:37-08 by arnaud in response to 1921
Re: Problem with simple connect.
Problem was solved by allowing authentication by password in tunnel mode in sshd_config.
Direct Responses: 4143 | Write a response
Posted on 2007-01-24 13:23:53-08 by stan13513 in response to 1922
Re: Problem with simple connect.
I have the same problem. How did you allow "authentication by password in tunnel mode in sshd_config"? If I create an ssh config with just PasswordAuthentication yes, it still dies at the same point: xxxx: Received encryption confirmation. xxxx: Trying RSA authentication with key 'root@xxxx.gspt.net' xxxx: Server refused our key. xxxx: Server refused our key. xxxx: Doing challenge response authentication. xxxx: No challenge presented. xxxx: Trying password authentication. Permission denied at ./myscript.pl line 19
Direct Responses: 4146 | Write a response
Posted on 2007-01-24 14:36:43-08 by stan13513 in response to 4143
Re: Problem with simple connect.
If I specify a valid password it works fine. The problem is, I'm trying to determine which password is set for a huge list of hosts and I need to try multiple passwords. I think I could fork to work around it but that seems excessive. Why doesn't ssh cmd fail gracefully insteaad of dying with Permission denied?
Direct Responses: 4163 | Write a response
Posted on 2007-01-26 12:26:08-08 by wardmw in response to 4146
Re: Problem with simple connect.
I would suggest that it was written this way for security reasons. Why make it any easier than it already is for a hacker to break in to other people's machines? |\/|artin
Direct Responses: Write a response