Operating System - HP-UX
1753770 Members
5204 Online
108799 Solutions
New Discussion

passwordless sftp from Windows to Unix is not working

 
SOLVED
Go to solution
laiju.c.babu
Regular Advisor

passwordless sftp from Windows to Unix is not working

Hi,

 

We want to set up a passwordless sftp from Winodws to Unix For this we have performed the below actions

 

1) We are using a FTP client called Attachmate for genenrating the keys and for sftp

2) The keys  which generated from that utility is added in  Unix machine succesfully

3) The password less SFTP  using the utility is working fine

4) But   while i am doing sftp from the windows command prompt its asking for password

 

99% its an issue with Windows side . But could you please have a thought on this.

 

Regards

Laiju.C.Babu
8 REPLIES 8
Dennis Handly
Acclaimed Contributor

Re: passwordless sftp from Windows to HP-UX is not working

Does the Windows side allow you to add the -vvv option?

Does it work going from HP-UX to Windows?

laiju.c.babu
Regular Advisor

Re: passwordless sftp from Windows to Unix is not working

Hi Dennis,

 

I am attaching the output of sftp -vvv option.

 

We are trying to connect from windows to HPUX

Laiju.C.Babu
Dennis Handly
Acclaimed Contributor

Re: passwordless sftp from Windows to HP-UX is not working

>I am attaching the output of sftp -vvv option.

 

It looks truncated?

 

>We are trying to connect from windows to HP-UX

 

Yes but does the other way work?  Or you haven't set up the keys for the reverse?

Matti_Kurkela
Honored Contributor
Solution

Re: passwordless sftp from Windows to Unix is not working

At the beginning of output, the sftp client seems to be reading its configuration file:

2013-02-08 15:26:26:996 debug1: Reading configuration settings from C:\Users\p.c
onsy.03\Documents\Attachmate\Reflection\.ssh\config.
2013-02-08 15:26:26:997 debug1: Invalid host section: Host sgsing2k8pdb01
2013-02-08 15:26:26:997 debug1: Ignoring config line:     IdentityFile "C:\Users
\p.consy.03\Documents\Attachmate\Reflection\.ssh\id_DSA_1024_SGSINGM2K8PDB01_a"
2013-02-08 15:26:26:997 debug1: Invalid host section: Host hpux82c

 

I guess it's trying to find a Host section in the configuration file that would exactly match the hostname you're trying to connect to. Apparently you've used the short form ("hpux82c") in the configuration file.

 

2013-02-08 15:26:27:000 debug1: Host: hpux82c.ey.com not found in configuration
file C:\Users\p.consy.03\Documents\Attachmate\Reflection\.ssh\config

 

The FTP client "thinks" that hpux82c.ey.com is not the same as hpux82c, so it is not applying any of the Host sections. So it will not know which identity file (also known as "the SSH private key") to use.

 

Possible solutions:

  • try connecting using the short hostname:
C:\Users\p.consy.03>sftp -vvv dapa01p@hpux82c
  •  or add this section to the configuration file C:\Users\p.c onsy.03\Documents\Attachmate\Reflection\.ssh\config:
Host hpux82c.ey.com
    IdentityFile "C:\Users\p.consy.03\Documents\Attachmate\Reflection\.ssh\id_DSA_1024_SGSINGM2K8PDB01_a"
    PreferredAuthentications publickey
MK
laiju.c.babu
Regular Advisor

Re: passwordless sftp from Windows to Unix is not working

Hi MK,

 

When we are trying with only hostname the sftp is working .. Thanks a lot for your help

 

Hi Dennis,

 

Thanks a  lot for helping us to solve this issue.

 

Regards

Laiju.C.Babu
Amoldamodar
Occasional Visitor

Re: passwordless sftp from Windows to Unix is not working

@Laiju,

Can you please share the steps you have followed from begining, I am not aware and very new to this thing. And started from scratch, Please also share the sample code you are using to connect from windows to HP-UX to get/put the files with all begining from genenrating the keys for sftp.

 

Please, waiting for your positive response!!

 

Amol

laiju.c.babu
Regular Advisor

Re: passwordless sftp from Windows to Unix is not working

Hi Amol,

 

We are not handling any thing in attachmate configuration .  In our scenario this is the responsibility of windows to team configure attachmate and generate the keys .

Our responsiblity is to just put the keys in the Unix server .

 

Regards

Laiju.C.Babu
Amoldamodar
Occasional Visitor

Re: passwordless sftp from Windows to Unix is not working

@Laiju,

Thanks a lot for your quick response!!
I am very new to everything so was confused, Can you please share the sample code for sftp from windows to HP-UX after key generation.

 

Thanks!!!

 

Amol