Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to get ssh up and running on a router running Tomato.

I just generated a new public key using

$ ssh-keygen

and everything went as expected. Typed in a passphrase, told me it was saved.

I copied that resulting id_rsa.pub contents into Tomato so that it now looks like this:

enter image description here

When I try to connect I get the following error:

$ ssh 10.10.10.1
Permission denied (publickey).

First time trying to do this with Tomato. Any thoughts?

FWIW, I'm trying to make it so that I can test sites I'm developing on my MacBook using name based VirtualHosts to work on my iPad for testing following this sort of advice. Any suggestions in that department would be welcome, as well.

share|improve this question
1  
Try connecting with ssh root@10.10.10.1 instead. –  CGA Aug 26 '11 at 12:42
    
@CGA: That did it. Could you answer the question so I can accept your solution, maybe with some background about why you need the root@ prefix? –  Tim Visher Aug 30 '11 at 8:33

2 Answers 2

up vote 1 down vote accepted

As CGA correctly asserts, you need to specify the user that you wish to log in as. If you don't do this, you will essentially be trying to log in as the current local user on the remote machine. In other words, if you're logged in as rune on your local computer, and you try to log in via ssh on the remote machine using this command:

rune@runescomp:~$ ssh 192.168.2.1

it will be equivalent to the following command:

rune@runescomp:~$ ssh rune@192.168.2.1

which will get rejected unless there's a user named rune on the remote machine.

share|improve this answer

I was having this same problem except that I was already using ssh root@192.168.1.1. I tried all sorts of stuff and went over my instructions over and over. I came to find out that there is a bug in Ubuntu (the system I was using to connect) that has been present for many, many versions which causes this problem. The solution was simply to type ssh-add from the Ubuntu client and enter the same pass phrase (or lack thereof) that was entered before. BAM! Instant access!

I just thought I would add that in case folks found this thread while searching for a solution (as I did).

HTH, Billy

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.