View Full Version : Help with Putty and SSH
mattfugitive
05-24-2008, 07:31 PM
Ok so I'm working on becoming a rails developer and I have a previous rails app I would like to upload and run on HM. I heard that the only way to do this is through SSH so I got SSH working.. or so I though.
The Java Applets are not working and I'm trying to connect via Putty but it keeps giving me an error saying the server is rejecting my key.
I created an SSH user and stuff and well nothing is working.
Guess what I'm asking is, and keep in mind I am a noob to Putty...
How do I configure Putty to connect to SSH????
oh btw if someone has a better way of adding an existing rails app to my server I'd be glad to hear it!
Thanks in advance
crabpot8
06-16-2008, 08:22 PM
Sure - I just started using this sort of stuff pretty recently, but I started with stuff Much harder than HM, so it sort of seems easy after you do it for a month.
Anyways, we are going to go through a few steps.
first, you need to get ssh enabled on your HM account. if you are using the Java applet, you have probably already done this, but to be thorough in my guide, just log in to cpanel, go to SSH access, and follow the instructions to get it enabled.
next, lets download the putty set of tools.
Here is the link you want
http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe
Download / Install
Now, you need to generate a key for accessing your HM account. This is a few steps long.
1) Go back to Cpanel, ssh/shell keys
2) hit manage keys
3) generate a new key
4) change key type to rsa (I have only used rsa and know it works - the other one might to but i have tested everything I am doing here)
5) choose name/pass of your choosing - hit generate key
6) go back
7) manage authorization - choose to authorize
8) view/manage the private key - and choose the convert option at the bottom
9) download converted key and save somewhere you will remember it
Ok - almost there. Now you just have to put the settings into putty and you are good to go.
1) open putty, in the host field put 'your_domain_name_here.com'
2) using ssh
3) go to tab Connection->SSH->Auth
4) browse to your private key
5) before you click open to open the connection, go back to Session tab and enter a name for the session and click save so its easy in the future
Now you can click open to connect, and it will ask you for your username
enter your 8 letter or less unix username (if you don't know what I mean, this is probably just the username you use to log into HM itself) and when it asks for a password, enter the password that you chose for the KEY (NOT your account, unless they are the same pass)
Hope that helps - if you have questions let me know
crab
PS - if you get annoyed by the username entry - just 'load' your session in putty, go to connection->data, and enter a username, the 'save' the session again. Now it will always try that username first :)
crabpot8
06-16-2008, 08:28 PM
oh - some good commands to try out
ls - list the current directories contents
cd - change directory. Example cd my_dir/
man - show the manual for a command. Ex: man ls
info - show some info for a command: Ex: info ls
help - just a good place to start
crab
shakshuk
07-11-2008, 04:49 PM
this was very helpful. but my putty still doesnt connect to my-domain.com. it says host does not exist. any idea why?
shadmego
07-11-2008, 04:59 PM
you cannot create your own ssh user. You have to use the username/password combo you use to log into CPanel. This is the only user allowed to log in via ssh.
crabpot8
07-11-2008, 05:04 PM
Well first things first - the questions I have to ask:
1 - Do you have ssh access enabled in your c-panel?
2 - have you followed that little guide I made step by step (and tried doing it twice, just in case you missed a step? The little things can get you pretty easily)
you should have the public private key (if you try the guide again, try creating another public/private key pair and use that one)
the key should be 'authorized' on your server - and the private portion of the key should be loaded into putty
the hostname is just your domain name - so basically your website. For me this is http://www.wearevanderbilt.com - so in host I put in is wearevanderbilt.com
check that you have followed that guide _to_the_letter_ before we both scratch our head over something simple
Also, any more details on what you are doing is greatly appreciated.
crab
shadmego
07-11-2008, 05:04 PM
this was very helpful. but my putty still doesnt connect to my-domain.com. it says host does not exist. any idea why?
Do you have any firewalls turned on that are blocking port 22?
Have you requested SSH to be turned on for your HM account? This should not stop you from finding your site through putty, but it's an important step if you want SSH access.
~regards
crabpot8
07-11-2008, 05:06 PM
you cannot create your own ssh user. You have to use the username/password combo you use to log into CPanel. This is the only user allowed to log in via ssh.
sorry, did he do that?
Perhaps you know something I dont - but I dont think that he would get a host does not exist if the username was wrong?
Sorry, not trying to be a jerk (if it sounds like it) I just don't see why you thought he tried to do that. perhaps a chance to learn something myself ;)
crab
shakshuk
07-11-2008, 05:08 PM
ok now i got it. the key was not authorized. thank you very much all!
crabpot8
07-11-2008, 05:09 PM
Do you have any firewalls turned on that are blocking port 22?
~regards
Agreed with shad -> there is a good probability that you have a local firewall that does not have port 22 open. If you are on windows (< Vista) then go to control panel, windows firewall, exceptions , add port, port 22 and tcp (name doesnt matter, choose something)
Also - please let us know if something works so if another user has the issue they can just get the answer from here before having to ask someone
crab
shadmego
07-11-2008, 05:11 PM
sorry, did he do that?
Perhaps you know something I dont - but I dont think that he would get a host does not exist if the username was wrong?
Sorry, not trying to be a jerk (if it sounds like it) I just don't see why you thought he tried to do that. perhaps a chance to learn something myself ;)
crab
The original poster said:
I created an SSH user and stuff and well nothing is working.
That's where my comment came from.
~regards
crabpot8
07-11-2008, 05:13 PM
ok now i got it. the key was not authorized. thank you very much all!
Sure thing, glad its working for you
crabpot8
07-11-2008, 05:16 PM
The original poster said:
That's where my comment came from.
~regards
Ah - sorry I did not realize you were responding to the original poster. My bad
crab
crabpot8
07-11-2008, 05:34 PM
Ok so I'm working on becoming a rails developer and I have a previous rails app I would like to upload and run on HM. I heard that the only way to do this is through SSH so I got SSH working.. or so I though.
The Java Applets are not working and I'm trying to connect via Putty but it keeps giving me an error saying the server is rejecting my key.
I created an SSH user and stuff and well nothing is working.
Guess what I'm asking is, and keep in mind I am a noob to Putty...
How do I configure Putty to connect to SSH????
oh btw if someone has a better way of adding an existing rails app to my server I'd be glad to hear it!
Thanks in advance
Matt,
Did you ever get this working or did you loose interest?
crab
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.