A simple JRuby wrapper around the Java JSch library.
Add this line to your application's Gemfile:
gem 'jsch-sftp', github: 'modcloth-labs/jsch-sftp'
then execute:
$ bundle
require 'jsch'
require 'jsch/sftp'
Jsch::SFTP.start('host', 'user', identity: '/path/to/keyfile') do |sftp|
sftp.entries('/').each do |entry|
puts entry.name
end
sftp.upload!('/path/to/local', '/path/to/remote')
sftp.download!('/path/to/remote', '/path/to/local')
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request