0.0
No commit activity in last 3 years
No release in over 3 years
SSH client that supports shell and exec channels
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 5.8
~> 1.1
~> 0
~> 10.0

Runtime

~> 3.0.2
 Project Readme

Oxidized::Ssh

This gem was built to extract SSH functionality away from oxidized into another gem that the community can use for purposes other than backing up devices. For instance, searching mac tables, arp tables, etc

Installation

gem install oxidized-ssh

gem 'oxidized-ssh'

And then execute:

$ bundle

Or install it yourself as:

$ gem install oxidized-ssh

require 'oxidized/sshwrapper'

Usage

For exec channels
ssh = Oxidized::SSH.new({ip: 'redacted', username: 'admin', password: 'redacted', exec: true)
ssh.start
ssh.exec!("ifconfig")

For shell channels
host = Oxidized::SSH.new({ip: 'redacted', prompt: Regexp.new(/^Vty-[0-9]\#$/), username: 'admin', password: password)
host.start
host.exec!("ifconfig")

For shell channels that need custom expectation handles                                                                                                                           #[class to call method on, method to call]
host = Oxidized::SSH.new({ip: 'redacted', prompt: Regexp.new(/^Vty-[0-9]\#$/), username: 'admin', password: password, expectation_handler: [b, :expects]})
host.start
host.exec!("show running-config")

Development

Todo:

Add oxidized support (Mass refactor)

*connected?
*cmd(cmd, expect=node.prompt)
*send(data)
*output
*pty_options(hash)

*Proxy Support

*Paranoid support

*Auth_method support

*Kex support

*Encryption support

*Mimic method names

  *Mimic method return values as well 

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/oxidized-ssh. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.