Skip to content

Instantly share code, notes, and snippets.

@JustinAiken
Created September 23, 2021 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JustinAiken/b1b5497e885102ff87d5e40fde90782a to your computer and use it in GitHub Desktop.
Save JustinAiken/b1b5497e885102ff87d5e40fde90782a to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "net-sftp"
end
require "net/sftp"
Net::SFTP.start("172.16.20.90", "joinery-bot", password: "<redacted>", port: 22) do |sftp|
# upload a file or directory to the remote host
sftp.upload! "~/projects/framebridge/glaze-joinery/foo.txt", "C:\\LPDropBox\\foo.txt"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment