Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Article: Automating File Uploads with SSH and Ruby

Article: Automating File Uploads with SSH and Ruby

Matthew Bass introduces us to the Net::SFTP and Net::SSH libraries in Ruby by learning by doing. He implements a simple clone of rsync, a tool to upload and synchronize local file systems with remote ones. By using the secure SSH protocol, this is secure and production ready.

In the process of building the tool, Matthew also shows some of the pitfalls that come with APIs and how to avoid them. For instance, uploading files to directories that don't exist will fail with an exception instead of creating the directories. Discovering little details such as this can make programming tedious at times, and the article also shows how to tackle these issues.

If you're interested in this kind of networking work with Ruby or just want to see a little real world tool in Ruby, be sure to read  Automating File Uploads with SSH and Ruby.

Rate this Article