Re: [Ssh-sftp-perl-users] Help using Net::SSH::Perl with automatic authentication
Brought to you by:
dbrobins
From: Eduardo R. A. <er...@gm...> - 2011-12-14 19:43:28
|
Well, permissions are O.K. on the keyfiles (600). Yes, (home) is the redacted path to my home directory. Under .ssh I have a known_hosts2 text file with the list of machines I usually connect and their keys (I believe), this is present in all machines I usually connect to. Also, under .ssh2 I have a hostskeys directory with all .pub files from machines I usually connect to, this is also present on all of them. I also created DSA keys and I'm having the same issue. So everything seems to be O.K. from what you told me and everything I've researched. I'm totally lost about what else I can try... 2011/12/12 Steve Phillips <st...@fo...> > On 13/12/2011 3:20 AM, Eduardo Ramírez Acosta wrote: > >> Looks like it was the Perl installation I was using. I switched to a >> more recent one and now I'm not getting the Data::Buffer error but I'm >> getting this (paths and host redacted): >> >> machine> ./test.pl <http://test.pl> >> >> machine: Reading configuration data (home)/.ssh/config >> machine: Reading configuration data /etc/ssh_config >> machine: Connecting to (host), port 22. >> machine: Remote version string: SSH-2.0-ReflectionForSecureIT_6.1.2.1 >> build 3005 >> >> machine: Remote protocol version 2.0, remote software version >> ReflectionForSecureIT_6.1.2.1 build 3005 >> machine: Net::SSH::Perl Version 1.30, protocol version 2.0. >> .machine: No compat match: ReflectionForSecureIT_6.1.2.1 build 3005 >> machine: Connection established. >> machine: Sent key-exchange init (KEXINIT), wait response. >> machine: Algorithms, c->s: 3des-cbc hmac-sha1 none >> machine: Algorithms, s->c: 3des-cbc hmac-sha1 none >> machine: Entering Diffie-Hellman Group 1 key exchange. >> machine: Sent DH public key, waiting for reply. >> machine: Received host key, type 'ssh-dss'. >> machine: Host '(host)' is known and matches the host key. >> machine: Computing shared secret key. >> machine: Verifying server signature. >> machine: Waiting for NEWKEYS message. >> machine: Enabling incoming encryption/MAC/compression. >> machine: Send NEWKEYS, enable outgoing encryption/MAC/compression. >> machine: Sending request for user-authentication service. >> machine: Service accepted: ssh-userauth. >> machine: Trying empty user-authentication request. >> machine: Authentication methods that can continue: >> publickey,keyboard-interactive. >> machine: Next method to try is publickey. >> machine: Trying pubkey authentication with key file >> '(home)/.ssh2/id_rsa_2048_a' >> machine: Will not query passphrase for '(home)/.ssh2/id_rsa_2048_a' in >> batch mode. >> machine: Loading private key failed. >> Permission denied at ./test.pl <http://test.pl> line 47 >> >> >> Same thing happens with id_rsa_2048_a and id_rsa_2048_a.pub (which one >> is the correct by the way?). The passphrase is null, could this be the >> problem? >> Thanks again, >> Eduardo >> >> > It seems it is trying to load your private key and failing for some > reason. Is there a way to turn on more debugging (I'm no longer using this > module so I forget what options there are available) - also, I'd be > checking the file permissions to ensure that this user can actually read > the file (to eliminate the obvious) > > Also, I assume that (home) is just your deletion of the fully qualified > home directory ? > > And the id_rsa_2048_a is the correct file, the other should go on the > other side of the connection and be called something like (or appended to > if this file already exists) 'authorized_keys' under the remote .ssh (or > .ssh2) directory depending on implementation. You'll possibly need to check > your man page to verify this as it seems you have a different installation > of ssh to the one I'm used to. The public/private thing however is pretty > standard, the 'public' key goes on the remote side (the .pub file) and the > private key is used locally (and should only be readable by the user - so > mode 600) > > HTH, > > -- > Steve. > > -- ɐʇsoɔɐ zǝɹıɯɐɹ opɹɐnpǝ "Mas tú, Jehová, eres escudo alrededor de mí; Mi gloria, y el que levanta mi cabeza." Salmo 3:3 |