sftp file transfer

hi
i am trying to login to remote server using SFTP Protocol and trying to upload a file butit is asking for the password.

Note: I am trying to connect to FrontEnd server

sftp SFTREGUP1@14.71.26.6
Connecting to 14.71.26.6...
Password Authentication
Password:

Please help

1) The remote server must have your public key in his authorized_keys.
2) The keys must not be generated with a passphrase/password.
3) Check your favourite search engine with the string "ssh without password" to get more info.

hi zaxxon
i have done all the requirements,but stil it is not working.
can u please explain the problem

As I wrote - either the public key of your ftp user is not added in the authorized_keys on the destination system or there has been entered a password/passphrase when generating that key.

If you did both, what does a

ssh SFTREGUP1@14.71.26.6 "ls"

show?

hi zaxxon

can u please tell how to checjk the Fingerprint and the passphrase for the bothservers

I don't know how to retrieve the passphrase for a key. Try asking the guy that created it, if he wrote it down in some sealed envelope.
Maybe it's easier to recreate the key and exchange it on the systems.

You did not write what error came when using ssh.

hi zaxxon

i have 4 servers in cluster environment 2 are backend and 2 are frontend.
For backend servers i am bale to login using sftp protocol without password but for frontend servers only the server is asking for the password.

This is the complete information can u please explain the problem

ok...If I read this correctly, and granted I'm in the middle of an overnight maintenance...so that's a big if...

The issue is that 2 of your boxes have shared ssh keys, meaning that they "know to trust each other". When on box goes to log into the other it checks against the .ssh/known_hosts file on both to see if it has a "magic word" to grant it access. That's why you can log into those two easy peasy.

Your other two boxes haven't been told that they are buddies, so when one tries to connect to the other, it heeds Moms advice and doesn't talk to strangers. What I believe Zaxxon is saying is that you may be able to recreate the keys assuming you know the passphrase, but it would probably be easier (for everyone involved) to just create new keys. It's a relatively painless process, I don't know it off the top of my head, but I found the method no more than ~a week ago by googling "ssh without password".

Since it works as you say with your frontend servers (what ever role that is), but not with your backend server, it seems the passphrase being entered at creation time can be left out, as it would ask for a password/not work with your 2 other servers either.

So I guess it's "wrong or no pub key" on your "backend" servers. Check them if their authorized_keys of the specific user etc. has the same pub key included as the other 2 where it's working.

hi DeCoTwc
u may be correct but for these servers i dont have admin acces.
and i am not able to use locate and slocate also, so can u plz briefly explain what might be the reason for this

I give up, good luck :slight_smile:

hi
i am using sftp and scp protocol to login to the remote server.but the remote server is asking for the password.
can any one explain in what are all the scenarios i can get this

please help

Ok...so we are now even further into the overnight Maint...so I may be even further off...

But are you saying that there is a server...for which you are not an admin ...that is asking you for a password...and you don't know why?

...I'd have to assume the reason for that is because, well, you know, because if we didn't have passwords people who weren't admins would be logging into our servers.

But I could just be sleep deprived.

hi
i am still searching for the answer, why 2 servers are allowing and other 2 are not .
please can anyone explain

one clue,

run the commands in verbose mode ( -v )

but that will give a cryptic output but you can track it down