Posted: Fri Oct 08, 2010 13:28 Post subject: trusted hosts file
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:
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:
Posted: Tue Feb 15, 2011 20:16 Post subject: Re: trusted hosts file
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