Skip to content

Instantly share code, notes, and snippets.

@StasKoval
Created September 15, 2015 11:47
Show Gist options
  • Save StasKoval/746e808d06ab20a8d882 to your computer and use it in GitHub Desktop.
Save StasKoval/746e808d06ab20a8d882 to your computer and use it in GitHub Desktop.
$ ssh-keygen -t rsa
$ ssh-copy-id -i ~/.ssh/id_dsa.pub user@machine
$ ssh user@machine
require 'net/ssh'
require 'logger'
Net::SSH.start(
'host', 'user',
:host_key => "ssh-rsa",
:encryption => "blowfish-cbc",
:keys => [ "~/.ssh/id_dsa.pub" ],
:compression => "zlib"
) do |session|
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment