Nick Carroll

Metabolising caffeine into code

SFTP StrongSpace without Password

with 2 comments

This little tip allows you to store your public ssh key on StrongSpace, which means you can use sftp and scp to access StrongSpace without having to type in your password each time.

From the command line, enter the following:

Generate your public and private key. You can accept the default settings, or enter a passphrase to secure your private key.


$ ssh-keygen -t dsa
$ chmod 400 ~/.ssh/id_dsa

SFTP to StrongSpace to create a .ssh directory.


$ sftp ss_user@ss_user.strongspace.com
$ mkdir .ssh
$ exit

Secure copy your public key over to StrongSpace.


$ cat .ssh/id_dsa.pub >> authorized_keys
$ scp ~/authorized_keys ss_user@ss_user.strongspace.com:.ssh/authorized_keys

We now need to CHMOD the authorized_keys file on StrongSpace so that only the user has read/write privileges. Note that when we SFTP in the following, we should no longer need to type our password in.


$ sftp ss_user@ss_user.strongspace.com
$ cd .ssh
$ chmod 600 authorized_keys
$ exit

If you want to add more keys to the authorized_keys file on StrongSpace, you’ll need to first copy it to your local computer, then concatenate the new public key to the file and copy it back to StrongSpace.


$ scp ss_user@ss_user.strongspace.com:.ssh/authorized_keys ~/
$ cat .ssh/id_dsa.pub >> authorized_keys
$ scp ~/authorized_keys ss_user@ss_user.strongspace.com:.ssh/authorized_keys

Written by Nick

September 23rd, 2006 at 1:59 pm

Posted in Programming

Tagged with ,

2 Responses to 'SFTP StrongSpace without Password'

Subscribe to comments with RSS or TrackBack to 'SFTP StrongSpace without Password'.

  1. This thread at the StrongSpace forums shows how to backup your TextDrive account to StrongSpace.

    Nick

    23 Sep 06 at 3:18 pm

  2. [...] need to create an ssh key. And provide a reference to your private key using [...]

Leave a Reply