|
||||
|
Create SSH Keys and login using putty - access denied
Hi,
I'm trying to create keys for my putty like this manual : http://www.webhostingtalk.com/showthread.php?t=664763 But when i login to root using putty always failed with access denied message. Anyone here have the same problem and have solution ?
__________________
It's me ...... It's me ...... |
|
|||
|
Whenever I use keys I just use the PuttyGEN program to make the key and then I upload it to the server. Do you load the key when you try to login via putty? If you don't tell the client to load the key, then it won't send it to the server and you won't be able to log in.
|
|
|||
|
I've never used the cpanel / whm interface to setup keys but its very simple to do manually. Perhaps you just need a sshd_config adjustment.
1. First copy your public key to your clipboard. 2. Add your key to /root/.ssh/authorized_keys (create the directory and file if it doesn't exist, one key per line.) 3. chmod authorized_keys to 0600 4. Edit /etc/ssh/sshd_config uncomment the following lines: PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys 5. Restart sshd Thats pretty much it. Once you verify your key works, then modify sshd_config again and comment out password authentication if desired. |
|
||||
|
Quote:
still not works. ------------------------- login as: root Authenticating with public key "rsa-key-root" Passphrase for key "rsa-key-root": Access denied root@xx.xx.xx.xx's password: -------------------------- Could you give me the inside of your sshd_config file ? I think something messy on my part that affecting my ssh login.
__________________
It's me ...... It's me ...... Last edited by isputra; 04-11-2008 at 04:26 AM. |
|
||||
|
Do you have the whole suite of programs from the Putty group. If so then start "PAgeant", which is the putty key auth agent. When you see it in your toolbar like your other running programs (usually near the time) right click on it and go to VIEW KEYS, the big white box will probably be empty, next click on ADD KEY, it should then bring up a file finder for you to locate the key on your local PC. Find the *.ppk file and open/add it. If it has a pass-phrase it will ask you for it, if you get it right it will add it to the keys listed. You can then try to logon to your system again with this Agent running, but you dont have to.
The reason to do the above is to make sure the key is properly formatted on your pc and that your password really does match what you think it is. Give it a try and let us know if that part works.
__________________
"A dog has raised it’s hind leg on the age of nevermore !" -- Rolf |
|
||||
|
Quote:
I think that there is something wrong with sshd_config because some parameter write double like : PasswordAuthentication yes UsePAM yes That's why i need another sshd_config to look for
__________________
It's me ...... It's me ...... |
|
||||
|
Quote:
If you really cannot get a copy of sshd_config the just go to any of the openssh mirrors (like ftp://ftp3.usa.openbsd.org/pub/OpenB...nSSH/portable/ ) and download any of the up to date versions of openssh and unpack it on your PC. Inside there is the sshd_config file in its original format.
__________________
"A dog has raised it’s hind leg on the age of nevermore !" -- Rolf Last edited by nyjimbo; 04-12-2008 at 08:54 PM. |
|
|||
|
I have a similar problem but not with root it actualkly works fine, I am using penguinet and when adding another user I generate the keys, authorize them and they even get in /root/.ssh/user and user.pub I even put shell access under whm but when trying to login it keeps asking me my username what should I put there? I am putting the cpanel user name as I generated the key also with the same name.
Thanks if anyone can help me. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|