The following instructions show how to set up a one-way secure ftp connection from your computer. The process is simple and only takes about 3 minutes!

 

Actions performed on the Local Host

1. Select the user account you wish to receive the connection then create the ssh key
       a. ssh-keygen
       b. When prompted, enter a filename such as /home/$USER/.ssh/sftpTransfer

2. Two files will be created in the following locations
      a. /home/$USER/.ssh/sftpTransfer
      b. /home/$USER/.ssh/sftpTransfer.pub

3. Copy the public key to the recipient account on the remote host who will make the connection
      a. /home/$USER/.ssh/sftpTransfer.pub

 

Actions performed on the Remote Host

Please ensure you have already received the public key from the client machine

4. Create authorized_keys file on remote server. (this server will initiate the connection)
      a. mkdir -p /home/$USER/.ssh/authorized_keys

5. Create a backup then copy the contents of the public key to the authorized keys.
      a. cp /home/$USER/.ssh/authorized_keys /home/$USER/.ssh/authorized_keys.ORG
b. cat /home/$USER/.ssh/sftpTransfer.pub >> /home/$USER/.ssh/authorized_keys

6. Secure the authorized_keys file
      a. chmod 400 /home/$USER/.ssh/authorized_keys

TEST the connection

1. Attempt to establish a connection using the following command
      a. sftp -o IdentityFile=/home/$USER/.ssh/sftpTransfer user@remotehostname
      b. Once the connection has established you should be able to securely browse folders and directories.