Skip to content

Wrapper around 'net/ssh' to make it easier to use - uses password for sudo automatically, and gives back an array of [stdout, stderr]

License

Notifications You must be signed in to change notification settings

Sarah-E-Greene/ruby-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby-ssh

Wrapper around 'net/ssh' to make it easier to use - uses password for sudo automatically, and gives back an array of [stdout, stderr], each an array of lines.

Usage

require 'ssh'

ssh = SSH.new(hostname, user, password)

stdout, stderr = ssh.run('sudo apt-get update')
raise "Error updating package lists: #{stderr}" unless stderr.empty?

stdout.select{ |x| x.match(/Reading package lists/) }

About

Wrapper around 'net/ssh' to make it easier to use - uses password for sudo automatically, and gives back an array of [stdout, stderr]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages