lib/open-dock/commands/ssh_host.rb in open-dock-0.1.8 vs lib/open-dock/commands/ssh_host.rb in open-dock-0.1.9
- old
+ new
@@ -4,10 +4,10 @@
c.description = "SSH connection to host or one of its containers if write [container_name]"
c.example "Connects to host:", 'ops ssh example.com'
c.example "Connects to a container:", 'ops ssh example.com www'
c.action do |args, options|
host = args[0]
- user = Ops::DEFAULT_USER
+ user = Ops::get_user_for(host)
if args.count == 1
ssh_port = 22
else
container = args[1]
\ No newline at end of file