Configure SFTP using ForkLift to InMotionHosting Reseller Account
In this post, I am going to list the steps required to set up SFTP connection to InMotionHosting Reseller account. I am using a Mac with ForkLift. If you are using Windows, a different FTP client or a different Hosting provider, some instructions may be different. These steps are also applicable to the InMotionHosting Shared accounts.
Enabling SSH on the cPanel account
By default, SSH is not active on a reseller account. To enable it, you need to login to the WHM account. If you have a Shared account, you will need to contact your hosting provider to request for SSH access.
- Account Functions > Modify an account
- Select the account that you want to enable SSH. Check on the Shell Access and click Save.
Generate the public and private keys
- Login to the cPanel of the account that you want to have SFTP connection. Click SSH Shell Access.
- Click Manage SSH Keys.
- Click Generate a New Key.
- InMotionHosting allows dsa Key Type with Key Size of 1024. Other hosting provider may allow rsa that allows up to 4096 Key Size.
- Enter a strong password for the Key Password. You need this key password for subsequent connection, so it is advisable to record this password somewhere on your computer.
- Click Generate Key.
- One Public and one Private key is generated. Click Manage Authorization to authorize this public key.
- Click View or Download for the Private Keys to download it to your computer. If you are using Mac, click the Download Key. If you are using Windows(Putty), enter a passphrase to unlock the private key and click Convert. Windows users would download the ppk format private key.
You now have the private key that would be used to connect to the server with SFTP.
Configure the SFTP Client Software
I am using ForkLift for file transfer. If you are using a different software, the instructions may differs slightly, but the general idea is the same.
- With ForkLift, connect to your server.
- Select the following options:
- Protocol: SFTP
- Server: your domain e.g. example.com
- Username: your user name that you used to log in to the cPanel.
- Leave the Password blank and click on the key icon to upload your private key.
- For InMotionHosting Reseller and Shared accounts, enter 2222 for the Port. If you are using a different Hosting provider, this Port number may be different. If you are using InMotionHosting VPS or Dedicated Servers, the Port number would be 22.
- You will be prompted for the private key password. Enter it and your connection would be successful.
Setting up SFTP took me many trials and errors due to the little information on the net on configuring an FTP client to handle SFTP connection. Most SFTP resources discuss connecting SFTP with SSH inside Terminal. I hope this article would be useful for web developers to use a client to connect with SFTP as it is convenient to use a client than cPanel to transfer files during development and maintenance. Some of the common third party FTP clients for Mac are: