adjacentlink / python-etce-tutorial

python-etce introduction by demonstration
Other
4 stars 0 forks source link

run tutorial and found Unknown hosts error. #3

Closed hongpeng-guo closed 4 years ago

hongpeng-guo commented 4 years ago

I tried to run the tutorial but found the "Unknown hosts: {localhost}" error. I deleted my ~/.ssh/known_hosts, and run "ssh localhost" to add my localhost address to the known_hosts file. But when I rerun this demo, the error is still there. The detailed error information is as follows:

Unknown hosts: {localhost}. Add to known_hosts (Y/N) [N]? Y

Unable to find an RSA SSH key associated with host "localhost". Either:

1) specify a key using the "sshkey" option 2) add a "Host" rule to your ~/.ssh/config file identifying the key 3) create a default RSA key ~/.ssh/id_rsa".

Quitting.

May I know how to solve this problem. I know that there are two more container hosts node-1 and node-2 in the 02.hello_lxc demo, do I need to add these two node to my ~/.ssh/known_host file? Is there a systenatical method to solve this error?

hongpeng-guo commented 4 years ago

Problem solved after reading this wiki https://github.com/adjacentlink/python-etce/wiki/Getting-Started