Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

How to Transfer Files using SSH and Ruby

By Peter Cooper / May 30, 2007

Matthew Bass has written a tutorial, published by InfoQ, called "Automating File Uploads with SSH and Ruby." It provides an in-depth look into building a small Ruby script that can backup files to a remote machine over SSH using the Net-SSH and Net-SFTP libraries. It goes into quite some depth, and provides source code for a recursive backup script. If you haven't had a dig into the Net-SSH and Net-SFTP libraries yet, it's worth a look to see how the basics work.


  1. Axis says:

    Neat tutorial, but I would think most users would find the rsync utility more useful than that end result.

  2. Daniel Berger says:

    Axis, if you created and published a pure Ruby rsync library, there would be many cheers amongst the Ruby community.

Other Posts to Enjoy

Twitter Mentions