Posted: Fri Oct 08, 2010 13:28 Post subject: trusted hosts file
Hello,
I'm configuring my WZR-HP-G300NH to do some operations at startup. So I wrote some scripts in the web GUI (DD-WRT v24SP2-EU-US), and they perfectly work.
Now I'm trying to perform some operations with SCP. So I have found this link:
http://www.dd-wrt.com/wiki/index.php/Telnet/SSH_and_the_Command_Line
and then added to my script a row in this way,
DROPBEAR_PASSWORD='my password' ssh user@hostname
as explained in the tutorial. It works too, but only if user@hostname is in the known_hosts file.
Is there a clean way to add it from the web GUI?
I have tried to put the following string in "Service > Secure shell > Authorized key", from the web GUI:
and then in the shell tried to connect via ssh, but the result is the following:
root@DD-WRT:~# ssh ggp@10.0.0.10
Host '10.0.0.10' is not in the trusted hosts file.
(fingerprint md5 de:39:5d:17:aa:0a:8c:47:36:28:6e:e1:25:fe:74:01)
Do you want to continue connecting? (y/n)
Posted: Tue Feb 15, 2011 20:16 Post subject: Re: trusted hosts file
Solution:
1. Now file known_hosts not exists.
ssh from router to 10.0.0.10 answer yes to "Host '10.0.0.10' is not in the trusted hosts file. Do you want to continue connecting? (y/n) "
2. cat /tmp/root/.ssh/known_hosts and save output somewhere. It will be something like 10.0.0.10 ssh-rsa xxx...
3. Before you write DROPBEAR_PASSWORD='my password' ssh user@hostname put in your script lines like this:
The first line will write 10.0.0.10's key to trusted keys list so you will not be prompted anymore to push 'y'
The second line will help dropbear to find known_hosts file because by default HOME=/ and ./ssh could not be created because of read only