Centripetal acceleration

For an object moving in a uniform circular motion, the centripetal acceleration is

\begin{aligned} a=\frac{v^2}{r} \end{aligned}

Since v=r\omega ,

\begin{aligned} a&=\frac{r^2\omega ^2}{r} \\ &=r\omega ^2\end{aligned}

It is important to note that this centripetal acceleration is not angular acceleration. Angular acceleration is used in a rotational body while what we are doing here involves an object moving in a circle.

A body of mass m would experience a force of \begin{aligned} \frac{mv^2}{r} \end{aligned}

Earth’s gravitational acceleration

An object moving in a circular motion around Earth experiences a centripetal force. Since this force equals to the weight,

\begin{aligned} mg&=\frac{mv^2}{r}\\ g &= \frac{v^2}{r}\end{aligned}

We can see that the velocity of an object moving around Earth depends only on its distance from the Earth’s centre(radius).

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.

  1. Account Functions > Modify an account
  2. Select the account that you want to enable SSH. Check on the Shell Access and click Save.

Generate the public and private keys

  1. Login to the cPanel of the account that you want to have SFTP connection. Click SSH Shell Access.
  2. Click Manage SSH Keys.
  3. Click Generate a New Key.
  4. InMotionHosting allows dsa Key Type with Key Size of 1024. Other hosting provider may allow rsa that allows up to 4096 Key Size.
  5. 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.
  6. Click Generate Key.
  7. One Public and one Private key is generated. Click Manage Authorization to authorize this public key.
  8. 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.

SFTP_img1

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.

SFTP_img3

  1. With ForkLift, connect to your server.
  2. Select the following options:
    1. Protocol: SFTP
    2. Server: your domain e.g. example.com
    3. Username: your user name that you used to log in to the cPanel.
    4. Leave the Password blank and click on the key icon to upload your private key.
    5. 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.
    6. You will be prompted for the private key password. Enter it and your connection would be successful.

Conclusion

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: