Skip to content

Instantly share code, notes, and snippets.

@msimonin
Last active August 29, 2015 13:57
Show Gist options
  • Save msimonin/9590329 to your computer and use it in GitHub Desktop.
Save msimonin/9590329 to your computer and use it in GitHub Desktop.
# By default taken from .ssh/config
# globally not related to the backend :
SSHKit.config.backend.config.ssh_options = {:user => "msimonin"}
# globally related to netssh
SSHKit::Backend::Netssh.config.ssh_options = { :user => "msimonin"}
# globally block
SSHKit.config.backend.configure do |ssh|
ssh.connection_timeout = 30
ssh.ssh_options = {
user: "msimonin",
keys: %w(/home/msimonin/.ssh/id_rsa),
auth_methods: %w(publickey),
}
end
# or defined per server
server 'access.grid5000.fr', roles: [:web, :app], ssh_options: { :user: 'msimonin'}
# or defined per role
role :web, %w(rennes.g5k toulouse), ssh_options: {:user => "msimonin" }
# or defined on "on"
on "msimonin@..." do |host|
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment