Operating System - Linux
1830940 Members
1880 Online
110017 Solutions
New Discussion

Reg: Use of Net::SFTP to achieve Public key authentication in HP-UX 11i

 
Chinna Meiyappan T
New Member

Reg: Use of Net::SFTP to achieve Public key authentication in HP-UX 11i

Anybody is using Net::SFTP to transfer files using Key based authentication?

So far i could establish a password based authentication sftp connection using Net::SFTP.

Any help is really appreciated.

When I use Net::SFTP to do the same without using the password parameter, it is giving Permission denied at /opt/perl_32/lib/site_perl/5.8.8/Net/SFTP.pm line 62.

Regards,
Chinna
1 REPLY 1
Steven E. Protter
Exalted Contributor

Re: Reg: Use of Net::SFTP to achieve Public key authentication in HP-UX 11i

Shalom,

1) Your error appears to be an problem with SHLIB_PATH or environment in your code. Not going to find much help debugging your code here.

2) Permissions and ownership of the home directory, the .ssh folder and the files inside are critical.

Example


[root@cleartux ~]# ll -d /root/
8 drwxr-xr-x 26 root root 4096 Mar 18 17:23 /root/
[root@cleartux ~]# ll -d .ssh
4 drwx------ 2 root root 4096 May 8 2006 .ssh
[root@cleartux ~]# ll .ssh/
total 36
4 drwx------ 2 root root 4096 May 8 2006 .
8 drwxr-xr-x 26 root root 4096 Mar 18 17:23 ..
4 -rw------- 1 root root 810 Aug 27 2007 authorized_keys
4 -rw-r--r-- 1 root root 1200 Feb 16 2006 authorized_keys2
4 -rw-r--r-- 1 root root 600 Dec 15 2005 authorized_keys.id_dsa.pub
4 -rw------- 1 root root 668 Dec 14 2005 id_dsa
4 -rw-r--r-- 1 root root 603 Dec 14 2005 id_dsa.pub
4 -rw-r--r-- 1 root root 3912 Dec 1 23:44 known_hosts


Those permissions/ownership work.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com