Remote Commands Over SSH

 

Your rsync.net account is a unix account, but you cannot log in directly - there is no interactive session.

However, you can run a large number of unix commands (like find, rm, cp, mv, etc.) over SSH - like this:

ssh user@rsync.net rm -rf your/file

or:

ssh user@rsync.net md5 some/file

Note - if you really want to work interactively, you can always mount your rsync.net filesystem locally, using sshfs.

 

Exploring Space Usage

 

If you just want to see how much space your account uses, the 'quota' command is by far the best choice:

ssh user@rsync.net quota

You can use the 'du' command to inspect the space usage of particular directories within your account:

ssh user@rsync.net du -Ahd2 some/directory

 

 

Checksum Commands

 

Your rsync.net filesystem has access to the following checksum commands:

md5, sha1, sha256 and rmd160

Remote checksums are run in this manner:

ssh user@rsync.net md5 some/file

 

Pipelining Through 'dd' (Database Dumps)

 

pg_dump -U postgres db | ssh user@rsync.net \
"dd of=db_dump"

or perhaps:

mysqldump -u mysql db | ssh user@rsync.net \
"dd of=db_dump"

 

Data Transfer to/from Amazon S3

 

rsync.net maintains the s3cmd binary in our environment so you can transfer data to and from Amazon S3:

ssh user@rsync.net s3cmd get s3://rsync/mscdex.exe

All you need to do is create a default .s3cfg file in the root of your rsync.net filesystem (you need to place this there manually, as --configure is disabled) and then edit the access_key and secret_key f ields. After you edit those two fields, you can begin running s3cmd commands remotely, like this:

ssh user@rsync.net s3cmd ls s3://rsync

A copy of the default .s3cfg file can be found here.

 

git

 

You can run the git command in our environment to do things like this:

ssh user@rsync.net "git clone git://github.com/freebsd/freebsd.git freebsd"

 

Miscellaneous Unix Commands

 

The other remote commands that can be used over ssh are:

echo
test
tree
tail
cp (GNU)
ls
mkdir
pwd
chmod
ln
mv
rm
rmdir
touch
chgrp
groups
id
s3cmd
passwd
quota
find

For example, you can run something like:

ssh user@rsync.net touch some/file

and then:

ssh user@rsync.net rm -rf some/other/file

The 'passwd' command, which is used to change your rsync.net password, is special, as it requires a '-t'

ssh -t user@rsync.net passwd

You can use the test command remotely, and return true/false to your local environment:

# ssh user@rsync.net "test -f fileThatExists"
#echo $?
0