Sftp connection not establishing from Linux to DataPower

Hi Everyone,

I am trying to send files from Linux to DataPower server using public key based authentication but it's not working as expected and every-time password expecting for sftp transfer.

Can someone please help on this?

Steps I fallowed:

  1. Created keys pair at source server
  2. Copied in public in DataPower Gateway config file
  3. Initiated transfer

Logs when I initiated transfer:

debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: ./publickey_for_pwdless.pub
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
user@XX.XX.XX.XX's password:

It's obvious that your publickey authentication doesn't work. Are you able to log in interactively, i.e. to a command line session? Are you using the correct protocol (version)?

Hi Rudic,

I am able to login using CLI with password using sftp protocol for that.

But I identified in logs there is no match found for DataPowerSSH, is that cause for public key login?

debug1: no match: DataPowerSSH_1.1

Regards,
Renu

Sorry, I don't have the slightest idea about what DataPowerSSH is and what it does / requires.
ssh needs

  • correct and compatible protocol and key version
  • correct key file location, including permissions
  • correct user.
    If you can log in interactively, sftp should work as well. If you don't, don't expect sftp to work.

You probably need to set up password-less SSH connection keys. If you have created the keys, put them in the correct place and it is still not working, it could be down to permissions. The SSH protocol is quite rightly paranoid so the various files & directories should be RW to the owner only.

Can you show us the output from both the client and the server side for these:-

uname -a
ls -ld ~ ~/.ssh ~/.ssh/*

Thanks, in advance,
Robin