I'm trying to create a script with scp command to put it in cron for copying files between two nodes. When i run the command it stops asking for password.I tried the -B option with scp and it didn't work. Any one have any idea..Thanks in advance
You have to have some sort of other authentication mechanism in place already (like public key, etc...). When you try to scp from command line are you prompted for a password?
Scott,
I was able to configure SSH with the doc "Automating logins with openssh" on my test system amd i was able to copy files between nodes using 'scp'and evrything working fine, but when i was doing the same for my production system it is giving me error for the 'scp' command.
scp -pr /userapps/niku/clarity/filestore/* clarpxapp02:/userapps/niku/clarity/filestore
The authenticity of host 'clarpxapp02 (192.168.76.35)' can't be established.
RSA key fingerprint is f0:6d:12:13:37:e2:f9:44:d8:3e:53:df:b7:17:a5:c2.
Are you sure you want to continue connecting (yes/no)?
One of the gotchas to watch out for when setting up automated scp and/or ssh jobs is to make sure that you have previously connected to all systems involved and accepted the host keys for it.
In your example above, its basically saying "I dont know this system - yet". Interactively scp or ssh to "clarpxapp02" and when prompted to continue connecting, type yes. After that, unless the key for that system somehow changes, it wont ask anymore.
You should always connect manually first time to all hosts involved to accept the keys. Once that is done, you can then set up the keys for automated jobs.
Scott,
But it's asking for the user's password each time i do the 'scp' command. Something wierd happening.It was very smoothe when i set it up on my test systems.Does it have anything to do with the sshd deamon.I tried refreshing the deamon.
Are permissions, etc, set correctly on the files and directories?
What are the details of the systems? IE what version of AIX? what account(s) are being used? What version of SSH is in use (is it consistant across the systems)? Include any other details that may help.
I checked the permission and everything looks right.AIX5.2 ML 7 across the nodes and ssh version is OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004 across the nodes.
This is what's happening
check the account settings for nikuser - see if logins/rlogins are set to false. I have seen instances where one (or both) being set to false will cause a password prompt to be displayed.
If one (or both) are set to false, try changing them to true and test again - see if that resolves being prompted for the password.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.