scp without password

Hi,
when I use

scp test.jsp user@remote:/tmp/ 

I'm prompted

user@remote's password:

How can I avoid it ?

Thank you.

This link is for ssh without password

The same steps have to be done for scp without passwd

http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html

?

...

There's a pretty nice possibility with Expect script, but there's a downside, because the password needs to be stored in a plain file.

JCN: How to use passwordless SSH

Hi gurus,
My objective is to transfer some files periodically from AIX server to Windows FTP server running ws_ftp. I followed the following steps. But no luck it keeps asking me the password when i do the scp.

  1. Generate a private and publick key using " ssh-keygen -t rsa" no Passphrase
  2. sftp the id_rsa.pub to the windows server c:/temp/
  3. from ws_ftp server import the keys for a particular user and call this as authorized_keys.
  4. Restart all ssh services on the ws_ftp server.
  5. Tried to scp file from the AIX server as " scp velli-test ftpuser@<windows-ftp server ip>:/velli-test . It prompts for password

What i also did is generate private and public key ont the windows server for that user ftpuser. Transfer the pub key to the AIX server as ~/.ssh/authorized_keys.
Still no luck
Needs some help from you all.

Regards
Velli

First try

ssh -v -v user@remote

and see if something is happening on the client side. You should see the public key being offered as part of the handshake.

You may need a new ssh (key generator) on the client side - there was a vulnerability in the random number generator that sshd will detect and refuse to use.

Or the server may have "PubkeyAuthentition no". Can you run the server side (sshd) with debugging on (requires root)? Or can you get to the sshd log on the server side? Or get the admin to tell you if something is in the log? There would be a clue about what is failing there.
--
qneill

Hi Qneill,
thanks for the response and sorry for the late response.
I figured out the problem. In the target side we need to change the file permission to 700 for .ssh directory and authorized_files hwould have the permission of 400.
After this it worked fine and no issues now
Thanks again for your help.

Regards
Velli