Passwordless login gets deactivated after some time
Hi Friends,
I was successfully able to login passwordlessly to server 1.1.1.2 from server 1.1.1.1 by following the below steps. I had already generated the keys using (ssh-keygen -t rsa) once and i am assuming i do not have to do that again.
After doign the above, i am able to login successfully passwordlessly for some time. But after some hours, it again asks me for password. How to make this change permanent?
I dint get you. The passwordless login thing is being reset somehow after initial setup . This is causing problems for me as i am unable to add a script to cron as the script has to login to the 2nd server to fetch data.
Can someone help
BTW, I copied the steps from here to login passwordlessly from 1 server to another
Update : OK, i got clue as to why this may be happening. I think the authorized_keys file is somehow getting deleted from server 2. When i again uploaded public keys to this file in server 2, it is showing new timestamp for today and it did not prompt for any overwrite or anything. So this authorized_keys file must be getting deleted. What could be the reason?
By ssh -v -v ... Corona688 wants you to increase the verbosity of the command output. It's easier for debugging.
Ok thanks for the explanation. As i understand, the function of the below codes is as explained
As i am suspecting that the authorized_keys is getting deleted from server 2 after 24 hrs(hence it is again asking for password while doing ssh from server 1). Shall i first check for the deletion of that file first and then run these commands(ssh -v -v) if the file has been deleted?
Ok thanks for the explanation. As i understand, the function of the below codes is as explained
As i am suspecting that the authorized_keys is getting deleted from server 2 after 24 hrs(hence it is again asking for password while doing ssh from server 1). Shall i first check for the deletion of that file first and then run these commands(ssh -v -v) if the file has been deleted?
If the authorized_keys file is getting deleted:-
Why?
What time is the ~/.ssh directory last updated?
Is there a company policy and therefore scheduled job to do so?
How would your code connect to re-create it?
If this is the case and you do want to keep re-creating it, then you may have to resort to a cron job on the server. Copy your authorized_keys file elsewhere, possibly outside ~/.ssh and as a different name, then copy it over each night.
I'm not suggesting that you breach your company rules though. You will need to adhere to company policy. If there is a rule, then there will be a reason. If you have a problem with it, it's best to discuss it rather than to circumvent it.
Hi,
I am a newbie and has been given a task to connect to a windows server from a linux server (using putty of course; for file transfer) that too passwordless.
Searching through google I found "ssh-keygen" but this also couldn't work because as I tried ssh <username>@<windowsServerIP>, it says... (5 Replies)
how can i use an expect script to do a passwordless ssh login and run a script on a bunch of remote hosts? I do not want to use public key authentication as this would require me to setup the keys on the clients etc.... (2 Replies)
Hi,
I am in the process FTPing some of my report files from my production server to another FTP server through batch/Shell Script.
This is working fine with the password less authentication.
Once i place all my report files in the ftp server the end users need to download ... (3 Replies)
This is Solaris 10 and sorce+destination are non root user. Somehow it is broke and I am not able to fix it. Already checked permissions on both servers and authorized_keys entry of destination is same as id_rsa.pub of source server. I can not regenerate keys on source server because I do not know,... (0 Replies)
Hi,
I have two users login on my HPUX i.e user1 and user2.
Inorder to switch from user1 to user2 without password I generated key pair using keygen command for user id user1 and copied the its public key to the .ssh/authorized_keys file of user2.
ssh-keygen -b 2048 -t rsa
This... (5 Replies)
Greetings!
I am trying to perform a passwordless SSH login from a HPUX 11.31 client to a HPUX 11.31 server. Whenever I do a "ssh -l root serverA" from the client, I am prompted for a password. Giving the password, I am able to successfully login. However I am trying to accomplish a... (9 Replies)
Hi GUYS,
Me have 2 servers, eg:: A & B
id_dsa.pub key of B had been put in authorized_keys of A & Vice versa
Passwordless login going from A to B.
But while connecting from B to A ,its asking password
Any one please help me out.. (6 Replies)
Hi Gurus,
Wanted to know if there is a way to enable passwordless login between specific users in a Solaris (5.9)server.
I copied the public key of first user into the $HOME/.ssh/authorized_keys file of the second user. But it didn't work out.
Note - Am talking about users in the same... (9 Replies)
I am trying to set up ssh/scp to be able to login in w/o using a password. The man pages for ssh and ssh-keygen explain how to do this.
So, using "rsa1" style, I created the public and private keys by way of ssh-keygen, then added the contents of "$HOME/.ssh/identity.pub" to a newly created... (6 Replies)