Password Required for OpenSSH in Oneric

Asked by keith d smith on 2012-02-05

I've installed the OpenSSH client and server using the online documentation, revised sshd_config from "PubkeyAuthentication yes" to "PubkeyAuthentication no" and exchanged/appended the files to authorized_keys2 files on both machines. I receive a request for a password when trying to ssh onto the remote machine. I type the remote user's password and it fails to connect. I've checked router configuration for port 22 forwarding and think I have that setup correctly. Can anyone offer a hint to help me get this app functioning correctly?

Question information

English Edit question
Ubuntu openssh Edit question
No assignee Edit question
Solved by:
keith d smith
Last query:
Last reply:

Can you connect to the server over the LAN?

keith d smith (kdsmith) said : #2

No. Its a home wireless network with one desktop and 3 laptops. I'm trying to ssh onto the desktop from one of the laptops. There is no ethernet or hard wire LAN.

It is still a Local network (LAN) the connectivity is moot. If you are trying to connect over the LAN then you do not need the router to port forward, you only need to do that if you are connecting from outside your network.

keith d smith (kdsmith) said : #4

Cool:-) I was able to fix the problem using the troubleshooting information on this page...

Here's what I did...
1. I created key files (public key is with a passphrase (had used a blank passphrase earlier)
2. I exchanged public keys between the two machines via memory stick
3. I added the public keys to filename authorized_keys
4. I created a new directory named with my userid under /etc/ssh/
5. I copied the authroized_keys file to this directory and removed it from /home/<userid>/.ssh/
6. I verified the file had proper privileges (chmod 644...) and the directory privileges were right (chmod 755...)
7. I restarted the ssh service
8. I tested the connection using ssh in the terminal, the remote machine's userid and IP address (as the host)

I can't say that all these steps were necessary (in fact some probably are not), but the problem is solved!