Deleted known_hosts file on private server, how do I get it back?
In my ignorance I deleted the known_hosts file on private server. I am not sure what the file type is supposed to be. In general, I have been having problems with ssh and passwords. For some reason, despite having generated a private/public key pair and successfully saving the .pub file onto the private server @ ~/.ssh I am still being prompted for passwords. That is what lead me to deleting the contents of the directory and trying to start over.
If not knowing the host (which identifies itself with some sort of key similar to the ssh key during login negotiation), the client informs you accordingly and asks you if you really want to continue / connect. You say "yes", the client stores the key, and knows the host the next time you connect.
Deleted known_hosts file on private server, how do I get it back?
The obvious answer is: Restore it from your backup. If you do not have one, or realize that your backup does not allow restoration, that may be a serious problem.
The file known_hosts does not really have to do with authentication. You may use ssh-keyscan to gather the keys from different hosts, or just initiate an ssh command to that host, like RudiC said. You may temporarily ignore the host-keys with an ssh command like this:
Authentication is described within the OpenSSH manpages. See here for details:
Check especially the AUTHENTICATION and FILES sections in ssh(1) command there for general descriptions and required file permissions. As reading this there, I would advise that all "recommended file settings" there are strictly done that way. I'm not sure that this wouldn't cause errors if not done so.
Hi Guys,
Greetings!.
I have executed the cronjob that runs the shell script which is in directory.When the cronjob was executed , I found that the directory where the script resides has got deleted.
Note: The directory was deleted with other use not root user.
The... (9 Replies)
I have connected to the source server by ftp command. when I tried to delete the file I am getting the permission error.
delete file1.txt
450 No permission to delete /today1/file1.txt
the files have below permission
150 File status okay; about to open data connection.
drwx------ 0 ... (3 Replies)
Hi,
In my server, the hostname and IP addresses are added to the known_hosts which then be hashed by ssh-keygen -H -f. Is it possible to check if an IP address has already been added to the hashed known_hosts to avoid duplications (I think there will be problems if there are duplicated IP... (3 Replies)
Hi
I was accessing our linux test server via putty and By mistake i deleted /etc/passwd file.....
It is allowing me to login..... So could anyone please help me out in this issue....
Please, it is urgent (6 Replies)
Hello,
I have a file known_hosts where i want to remove a key, but i don't how to do remove a client on it ?
Can you help me please ?
Thanks very much (1 Reply)
Where in the world are the ssh private keys stored on the home server? I know the public keys are renamed to authorized_keys under the /export/home//.ssh directory on the remote server. (1 Reply)
I deleted my partition on a test server and want to
bring back the partition.
I have not rebooted yet, so system is operational.
I have the /proc/partition
major minor #blocks name
8 0 195359960 sda
8 1 1044224 sda1
8 ... (2 Replies)
Hi,
Can any one tell me how to restore back the deleted file in unix?
I know the file name.
If i know the inode number of the file does help more to restore back the file? (1 Reply)
Hi guys,
I'm in the progress of setting up a private network in our Sun solaris platform.
Existing ip: 172.16.102.101
New private ip: 192.168.2.3
Netmask is the same for both private & public 255.255.255.0
After setting up the ip, I'm able to ping this private ip address from our... (3 Replies)