SSH (or "Secure Shell") is a network protocol that allows you to exchange data with a remote host over an encrypted channel.
Net::SSH is a way for Ruby to interact with SSH (Secure Shell) protocol. It relies on the OpenSSL library for encryption.
The Net::SSH library contains handy abstractions for most common tasks so you don't always have to think about channels. However, to get the most out of the library, you'll have to learn about channels.
Running programs with Net::SSH is simple enough. The
Session object gives you two convenient methods with which to accomplish this task.
SSH is not just for
running commands, it's a general conduit for encrypted communications between two hosts. One common use for SSH is to transfer files using the SCP protocol over SSH. You can use SCP in your Ruby programs with the Net::SCP library, which is a supplement to Net::SSH.