Merge pull request #84 from cloudbees/master
Don't force port 22 if the port is not set.
This commit is contained in:
commit
47c8d72243
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue