Merge pull request #84 from cloudbees/master

Don't force port 22 if the port is not set.
This commit is contained in:
R. Tyler Croy 2013-12-11 10:49:09 -08:00
commit 47c8d72243
1 changed files with 6 additions and 4 deletions

View File

@ -198,10 +198,12 @@ module Blimpy
end
def ssh_commands(*args)
['ssh', '-o', 'PasswordAuthentication=no',
'-o', 'StrictHostKeyChecking=no',
'-p', (ssh_port||22).to_s,
'-l', username, dns, *args]
cmds = ['ssh', '-o', 'PasswordAuthentication=no',
'-o', 'StrictHostKeyChecking=no' ]
if (ssh_port)
cmds += [-p, ssh_port.to_s]
end
cmds += ['-l', username, dns, *args]
end
def ssh_into(*args)