View Full Version : help with SFTP and SSH
usualis
07-21-2008, 04:46 PM
Hi all,
I'm a beginner so forgive my inexperience. I was told by hostmonster support to upload my webpage using unlimitedFTP but later learned that this is not a secure way to transfer files so I am trying to upload with SFTP or SSH but having a hard time.
I tried using Filezilla's SFTP and WinSCP's SFTP to upload. I created the SSH pair of keys (and hostmonster put them wherever, not sure if in the right place). Hostmonster support has been very friendly but they couldn't figure out what the problem is. They suggested I use my unix username (8 letters) as the "host name" instead of "ftp.mywebsitename.com" but the program did not recognize the host name. With "ftp.mywebsitename.com" I was able to get a bit further but it did not recognize my password (even after changing it to a simple password and testing several times).
I will be very appreciative of any suggestions.
Thank you!
shadmego
07-21-2008, 05:26 PM
SSH key pairs only provide an alternative method of signing into your account "shell" via SSH. It isn't required or necessary to create these keys, but the option is there anyway.
I don't know what error you are receiving, but SFTP and SSH both require that the TCP port 22 is allowed through any hardware/software firewall installed on your network.
Using ftp.mywebsitename.com (ftp://ftp.mywebsitename.com) will use the standard port 21, which is typically allowed by default on most home based firewalls.
My first suggestion would be to make sure you open up port 22 on your network/router/firewall ... whatever. If you still can't connect, let us know.
It would also help narrow the problem down if we knew what error you were receiving.
~regards, and welcome to the Community!
usualis
07-22-2008, 01:09 PM
The error message is: "Connection has been unexpectedly closed. Server sent command exit status 0... Access denied. Authentication failed."
I read the possible reasons for these messages in the WinSCP help page but they all revolve around wrong passwords or usernames and expired accounts, certainly not the case.
WinSCP had port 22 as a default in the opening window, so I did not change it because I had read that this is the correct port for SFTP. I don't know how to change that somewhere else in my computer...
Thank you so much for your prompt response, I feel very welcome!
shadmego
07-22-2008, 02:55 PM
What I was referring to with allowing port 22 out of your network was in relation to any security software you might have installed. Since you are getting a response from the server, you are probably all set and port 22 is allowed through your network.
The only other possible two reasonse you are getting this error, in my estimation, are:
1. You don't really have the correct username/password combination
2. Hostmonster has some kind of configuration problem for your account. Either it is that your IP address got blocked somehow by their firewall or FTP/SSH is misconfigured for your account. I don't think it is the firewall problem because if it were, you would get a refused connection error, not an Access denied error.
I would look at this:
make quadrupal sure you have the correct username and password.
your username should be the same name you use to log into your CPanel (8 character name based on your domain name) and the password should be the one associated with this account.
If you happened to create another FTP account, should should not be trying to connect through port 22 with that account as far as I know. The only account allowed to connect through port 22 is your main (CPanel) account. If you are trying to use another account you created, the username should be in the form of an email:
ftpaccount@yourdomain.com
This is about all the advice I can give you. If I am way off, don't come back and tell me ... there are others here that think I'm really smart when it comes to this stuff and I would hate to burst their bubble! ;)
~regards
P.S. Do let us know if and how you fixed your problem so others can learn from your experience!
usualis
07-23-2008, 02:28 AM
YOU ARE A GENIUS!
Let me join the others who think you are smart and inflate your bubble (wink).
I was under the impression I had to create an FTP account to be able to upload files using SFTP. Hostmonster's tech support reinforced this notion, the guy encouraged me to use my FTP account, but as you said, that doesn't work.
Solution: as per your suggestion, use the 8-digit username and password connected to the main account. Works perfectly.
Many thanks shadmego!
pghcollectibles
07-23-2008, 09:24 AM
dont forget to delete the unused ftp account
usualis
07-23-2008, 04:50 PM
Thanks, will do. Visited your page, nice work! I hope one day I'll know enough to build a similar page, right now I just have a book on HTML.
klynn
08-29-2008, 04:53 PM
In order to be able to use SFTP - SSH File Transfer Protocol
you can use the free shared SSL that Hostmonster provides for your main account, ie https://secure.hostmonster.com/~[username]
Now with that you really need to connect with your IP address.
So first do a run / cmd / ping yourdomain.com
in order to find out your IP (mine is 74.220.202.10)
Then use the following setting for FileZilla
hostname: your ip (74.220.202.10 in my case)
port: 22
server type: SFTP - SSH File Transfer Protocol
connection type: normal
username: you should know this (I think just the first 8 letters of your domain) - BE very CAREFUL here to use only the PLAIN USERNAME - DO NOT use this full username@yourdomain.com as this will not work!
password: you should know this
That's it!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.