Page 1 of 2

Can't get SSh connection with putty

Posted: Mon Jan 11, 2010 10:26 am
by Joserver
I Did a new install of Fedora 12 and amahi 5.
I did follow the wiki on setting up Putty to connect to the server using ssh. But something is not working.
When I connect with putty to the server I get the following respons:
Using username "Username"
Server refused our key
Username@192.168.-.-'s password.
I can now connect using the user password.

I did try to set it up 5 more times using a new set of keys and still get the same results.

What is wrong or am I doing something wrong??? :?:

Re: Can't get SSh connection with putty

Posted: Mon Jan 11, 2010 10:40 am
by pjcrux
I Did a new install of Fedora 12 and amahi 5.
I did follow the wiki on setting up Putty to connect to the server using ssh. But something is not working.
Normally when I connect I just fire up putty typa in "HDA" in the server field then when it asks me for user I can use either root or another user and their password. However, If I tried to use another user (let's go with Peter for example) putty would not connect.

Did you recreate your password under the user's tab? ex. just retype the password in the user section to change the password (can be same password). I had issues with this myself and this was a possible fix.

Re: Can't get SSh connection with putty

Posted: Mon Jan 11, 2010 12:09 pm
by Joserver
I did change the user password after installation. I just did it again to check but that is not the sollution.

I can not login using the ssh tunnel.

Re: Can't get SSh connection with putty

Posted: Mon Jan 11, 2010 3:15 pm
by bsk
Do you have your HDA set as DHCP and DNS right now? If not then HDA will not work in the server field, but the IP will. Make sure the IP address you are typing in is correct, as well as the username/password case is correct (upper/lower case).

Re: Can't get SSh connection with putty

Posted: Mon Jan 11, 2010 4:30 pm
by Joserver
My HDA is setup as dhcp server and dns server.
I'm using the correct IP (static) correct password and user name(with the correct upper and lower case).

I still get "Server refused our key" and I can still login with the username and password but without ssh, and that is what I want.

Re: Can't get SSh connection with putty

Posted: Mon Jan 11, 2010 5:23 pm
by Joserver
I started again.
I followed the following instructions on the wiki http://wiki.amahi.org/index.php/Key-Based_SSH_Logins.
Removed the public and privat keys, generated them again and put the public file in the folder .ssh.

When I start putty and fill in the IP of my server I can login at the server.
login as: Joh..
Joh..@192.168.2.10's password:
Last login: Tue Jan 12 01:08:21 2010 from h101.----.home
[Joh--@......ver ~]$
When I put My Username in the data section of Putty and the location of the private key in putty i get
Using username "Joh..".
Server refused our key
Joh..@192.168.2.10's password:
Then I can login with the use of my login name and password.
I saw that my privat key is loading but somehow there is somthing going wrong.
I looked at my firewall ( Zonealarm) but that is not it. ssh with putty is allowed.
It has to be something on the server. But I do not know what .
Does somebody have a clue?

Re: Can't get SSh connection with putty

Posted: Tue Jan 12, 2010 12:55 am
by moredruid
you can try ssh -vvv user@host
this should give you much more info.

in Putty you can choose to log all session output in Session -> Logging -> Session logging to a file which you can check yourself.

make sure your username is in all lowercase, and check the permissions on your .ssh directory and the key file, they should be:
drwx------ user users 4096 .ssh
in .ssh:
-rw-------user users <size> authorized_keys

Re: Can't get SSh connection with putty

Posted: Tue Jan 12, 2010 2:03 am
by Joserver
I have logged a session and excecuted the comment you gave and this is the output.
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2010.01.12 09:54:48 =~=~=~=~=~=~=~=~=~=~=~=
Using username "Johan".
Server refused our key
Johan@192.168.2.10's password:
Last login: Tue Jan 12 09:50:18 2010 from orye-rozen.orye.home

]0;Johan@Joserver:~[?1034h[Johan@Joserver ~]$ ssh -vvv user@host
OpenSSH_5.2p1, OpenSSL 1.0.0-fips-beta4 10 Nov 2009
debug1: Reading configuration data /etc/ssh/ssh_config

debug1: Applying options for *

debug2: ssh_connect: needpriv 0

ssh: Could not resolve hostname host: No address associated with hostname

]0;Johan@Joserver:~[Johan@Joserver ~]$ ^C
]0;Johan@Joserver:~[Johan@Joserver ~]$
Does it has something to do with the hsotname? Is the DNS server not working coorectly?

Some help please?

Re: Can't get SSh connection with putty

Posted: Tue Jan 12, 2010 2:19 am
by moredruid
looks like you're trying to connect to the server with hostname "host" and username "user"
you should try to connect to the server with your own username and the servername:
ssh -vvv johan@192.168.2.10

again, check if your username contains a capital letter, it should be all lowercase!

Like I mentioned in the previous post, make absolutely sure your .ssh & authorized_keys permissions are correct, otherwise ssh will not allow access. Ssh is very _very_ picky about that.

Re: Can't get SSh connection with putty

Posted: Tue Jan 12, 2010 3:04 am
by Joserver
My Login is with a capital letter and so is the password.
With Fedora 10 and amahi 4 I did not have a problem to login using ssh.

attached is the logfile witch I made using the line you said.
Can someone translate that to me?