When I type .ssh root@10.0.02 it says host not recognized I'm unable to get in to known host file can not fix the problem.

When I open terminal and do sash roor@10.0.0.2 it says warning rsa key not recognized to go to known-hosts file which ican not grt into I have download pico but am not sure how to launch it or what I ave to do.

mac desk top-OTHER, Mac OS X (10.6.8)

Posted on Jan 16, 2012 4:52 AM

Reply
17 replies

Jan 16, 2012 7:51 AM in response to sibeen

sibeen, please stop starting new posts when you are really just continuing the first post. "Reply" to one of your existing posts when you are really just continuing the same question. If I have not lost count, you have posted 3 times about this same ssh rsa host key issue, and Linc Davis and I have been trying to keep track of all the details, but with it spread out across multiple new posts, it is difficult.


I'm guessing as you again forgot to post the actual error (I'm starting to wonder if you are testing how well Linc and I can guess at your problem 🙂 ). Anyway, I'm guessing that you managed to delete the $HOME/.ssh/known_hosts file, and now when you try to ssh to 10.0.0.2 it wants to add the remote system's host rsa key into a newly created known_hosts file.


The authenticity of host '[10.0.0.2]:22([10.0.0.2]:22)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)?


Generally the command ask if you want to do this, yes or no. You type "yes" and your Mac memorizes the remote system's host rsa key.


If this is not the warning message you are seeing, then as Linc has requested, please post the exact error (feel free to mask put the actual key or usernames or IP addresses, but keep the words.


If you are still getting the original error from 3 posts ago, then I would not try editing $HOME/.ssh/known_hosts, and instead just delete the file, and when you get a message like I have posted above, answer it with "yes".


WIth respect to pico, Mac OS X already has pico installed, so there was no need to download it from anywhere. However, most people just use 'nano' which has essentially replaced 'pico' as an easy to use Terminal based text editor. But like I said, I think you will be happier if you just delete the known_hosts file and get on with your ssh operations.


Finally, I think in your 2nd post you indicated you tried deleting a file that had a dash in the name (known-hosts) instead of an underscore (known_hosts). If that was just a typo when you entered your post, and you were really getting you cannot delete a directory, then something is seriously wrong, or you accidentally allowed a space to be inserted between .ssh and known_hosts. Personally, I'm going with you actually entered a space and the 'rm' command thought you wanted to delete the .ssh directory instead of $HOME/.ssh/known_hosts. I could be wrong, but using copy and paste to post actual Terminal screen output as well as the command you entered would be very helpful to anyone trying to provide useful information. In other words, help us help you.

Jan 16, 2012 8:26 AM in response to sibeen

OK. if you cannot edit known_hosts


nano $HOME/.ssh/known_hosts


and using the arrow keys and the delete key are unable to remove line 3,


AND/OR you cannot just delete known_hosts


rm $HOME/.ssh.known_hosts


Then please post theh output from the following ls command:


ls -RaleO@ $HOME/.ssh  #where O is capital O


That will help tell us if your known_hosts file is really a directory as your previous reply indicated.

Jan 26, 2012 4:34 AM in response to BobHarris

Last login: Thu Jan 26 23:05:37 on ttys000

neilosullivan:~ neilosullivan$ .ssh. root@10.0.0.2

-bash: .ssh.: command not found

neilosullivan:~ neilosullivan$ .ssh. root@10.0.0.2

-bash: .ssh.: command not found

neilosullivan:~ neilosullivan$ ssh root@10.0.0.2

Password:

Password:

Connection closed by 10.0.0.2

neilosullivan:~ neilosullivan$ ssh root@10.0.0.2

Password:

Password:

Password:

Permission denied (publickey,keyboard-interactive).

neilosullivan:~ neilosullivan$


Hi have been putting alpine in as password and it is not working.

Jan 26, 2012 4:57 AM in response to BobHarris

Last login: Thu Jan 26 23:22:29 on ttys000

neilosullivan:~ neilosullivan$ rm $HOME/.ssh/known_hosts

neilosullivan:~ neilosullivan$ ssh root@10.0.0.2

The authenticity of host '10.0.0.2 (10.0.0.2)' can't be established.

RSA key fingerprint is e5:8e:34:11:6d:80:a9:e7:29:af:2e:f0:66:39:f7:d6.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts.

Password:

Password:

Password:

Permission denied (publickey,keyboard-interactive).

neilosullivan:~ neilosullivan$

Typed in what you said it still wont accept password.

Jan 26, 2012 4:58 AM in response to sibeen

neilosullivan:~ neilosullivan$ ssh root@10.0.0.2

Password:

Password:

Password:

Permission denied (publickey,keyboard-interactive).

neilosullivan:~ neilosullivan$


Hi have been putting alpine in as password and it is not working.


At least you are no longer getting the "rsa key not recognized" error.


Can you successfully ssh to a non-root account on 10.0.0.2 ???


If you can, then you should try 2 test ssh commands


ssh -v -v -v root@10.0.0.2

ssh -v -v -v someOtherUser@10.0.0.2


Now compare the debugging output from both commands, and look for where they start to significantly differ. The debugging messages in that area will most likely indicate what ssh is getting upset about on the remote system.


Also you can look on the remote system and check the /var/log/secure.log for any sshd error messages. These can also give a good indication as to why you cannot login.


Also I'm assuming you have previously enabled the root account on the remote system. Assuming it is a Mac, the root account is not enabled by default (that is to say it does not normally have a valid password). If this is some other system (Linux/Unix), then the location where the remote system logs the sshd messages may be different.


One last question. Why do you want to login as root on this other system? I'm only asking because maybe there is another way to do what you want without logging in as root. Then again, maybe not. Generally speaking I do not enable my root password, but rather I setup ssh-keygen keys for root, that allow me to ssh in without knowing the password for root, but knowing the passphrase I setup for the ssh-keygen keys.


This involves generating a set of public and private keys on your local system in the account you are using to issue the ssh command. You then copy the $HOME/.ssh/id_*.pub file to the remote system by whatever means you find easiest. You then append the id_*.pub file to the end of the remote system's /var/root/.ssh/authorized_keys file.


remote system$ sudo cat id_*.pub >>/var/root/.ssh/authorized_keys


Now when you ssh from the local account to the remote system's root account, you will be prompted for your ssh-keygen passphrase.


If you should decide to try the ssh-keygen key approach, and you still have difficulties, the output from ssh -v -v -v and the secure.log sshd error entries is always useful.

Jan 26, 2012 5:53 AM in response to sibeen

Well when you said


Hi have been putting alpine in as password and it is not working.


what is alpine?


Is this 10.0.0.2 system a Mac, or some other system?


A Mac's root account is shipped disabled (that is to say it does not have a valid password). Unless you intentionally gave a Mac's root account a valid password, it will never let you login using the ssh root@10.0.0.2 command.

Jan 26, 2012 7:56 AM in response to sibeen

sibeen wrote:


I have not given root account a password i really dont know what is going on.

If 10.0.0.2 is a Mac, and someone else controlling that Mac has not enabled the root account, then you will NOT be able to login.


So I'll ask again. Why do you want to login as root to this system? Most admins today do not login as root (older grumpy admins may still insist on it 🙂), but these days, admins just use the 'sudo' command, as you can generally do just about everything with root privileges via the sudo command as you can logging in as root, without the risk that casual use will accidentally do something stupid as root (and most older grumpy admins, myself included, have done just that).


So maybe it is it time to explain why you want to be root, as I'm getting the feeling that you are not an experienced Unix admin. Maybe there is another way to do what you want to do.

Jan 26, 2012 8:08 AM in response to sibeen

Is 10.0.0.2 the Apple TV?


Has it been jail broken to allow root access?


As far as I know, Apple does not ship the Apple TV (original, nor the latest) with an enabled root account (I could be wrong, as I do not own an Apple TV). And the only way to get to an Apple TV root account is via Jail breaking the device (or so I think I remember from internet blogs and Mac oriented podcasts).


And discussing jail broken Apple products violates the Forum Terms of Use.


As long as we are talking logging in as root to a Mac or a Linux/Unix system, I am willing to help as much as I can, but a) I do not have an Apple TV, b) I have never jail broken one (like someone else's), and besides the forum Terms of Use disallow jail breaking discussions. Sorry.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

When I type .ssh root@10.0.02 it says host not recognized I'm unable to get in to known host file can not fix the problem.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.