I came across a few pitfalls in my attempt to get my Textdrive account talking to my StrongSpace account over SSH without needing to enter my StrongSpace password at the prompt. I am setting out all of the steps necessary to get this working here so that others can avoid these same problems.
Prerequisites
You should be familiar with gaining access to and using BASH on your Textdrive account before you go any further - if you don’t then I suggest you go here for more information. I accept no responsibility for any damage or problems you may cause when using this tutorial. Make sure you take adequate backups and check any scripts before you run them.
Step 1: Creating the keys
To get started, we need to create a set of keys:
- Log into your Textdrive shell, and navigate to /users/home/USERNAME/.ssh/
- Run the following command
ssh-keygen -b 1024 -f ss -P '' -t dsa - This will create two files - ss and ss.pub
Step 2: Uploading the public key (ss.pub) to your StrongSpace account
- Download ss.pub to your local machine
- SFTP to your StrongSpace account
- Create a new directory called .ssh under your account
- chmod this directory to 700
- Upload ss.pub to this new folder
- rename it to authorized_keys
- chmod authorized_keys to 600
Step 3: Test!
OK, you now have your private key on your Textdrive account, and the corresponding public key on your StrongSpace account. We are good to test.
Go back to your Textdrive shell, and type:
ssh -i ss SS_USERNAME@SS_USERNAME.strongspace.com
You should now log directly into your account without needing to enter a password.
Notes:
If you already have an keys on separate lines.