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
|
end
|
||||||
|
|
||||||
def ssh_commands(*args)
|
def ssh_commands(*args)
|
||||||
['ssh', '-o', 'PasswordAuthentication=no',
|
cmds = ['ssh', '-o', 'PasswordAuthentication=no',
|
||||||
'-o', 'StrictHostKeyChecking=no',
|
'-o', 'StrictHostKeyChecking=no' ]
|
||||||
'-p', (ssh_port||22).to_s,
|
if (ssh_port)
|
||||||
'-l', username, dns, *args]
|
cmds += [-p, ssh_port.to_s]
|
||||||
|
end
|
||||||
|
cmds += ['-l', username, dns, *args]
|
||||||
end
|
end
|
||||||
|
|
||||||
def ssh_into(*args)
|
def ssh_into(*args)
|
||||||
|
|
Loading…
Reference in New Issue