Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

vijayin

Posts

10

Joined

Wed Dec 10, 2008 3:51 am

SFTP Failed - Public key Authentication

by vijayin » Thu Jan 29, 2009 6:53 am

Hi,

I have set up the sftp between two unix machine and my client is running on one of the unix1 machine I want to connect to other unix2 machine using unix1 privatekey. Through command prompt I am able to login from unix1 to unix2. But when I run my application it is throwing the exception like

Caused by: java.io.FileNotFoundException: /home/vbb615c/.ssh/id_rsa (The file access permissions do not allow the specified action.)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:135)
at java.io.FileInputStream.<init>(FileInputStream.java:95)
at com.enterprisedt.net.ftp.ssh.SCPClient.setAuthentication(Unknown Source)

But the file permissions on the .ssh folder is

drwx------ 2 vbb615c mqm 512 Jan 28 11:34 .ssh

files inside .ssh directory having below permissions.

-rw-r----- 1 vbb mqm 398 Jan 28 11:27 id_rsa.pub
-rw------- 1 vbb mqm 1743 Jan 28 11:27 id_rsa
-rw-r--r-- 1 vbb mqm 540 Jan 28 11:28 known_hosts
-rw------- 1 vbb mqm 397 Jan 28 11:34 authorized_keys

Let me know where I am doing wrong.
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: SFTP Failed - Public key Authentication

by support2 » Thu Jan 29, 2009 9:08 am

The directory is owned by vbb615c, but the file is owned by vbb

Maybe make sure the dir owner & file owner are the same, and that your app runs as that user.
no avatar
User

vijayin

Posts

10

Joined

Wed Dec 10, 2008 3:51 am

Re: SFTP Failed - Public key Authentication

by vijayin » Thu Jan 29, 2009 9:25 am

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: SFTP Failed - Public key Authentication

by support2 » Thu Jan 29, 2009 10:52 am


Who is online

Users browsing this forum: No registered users and 22 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign