Skip to content

Commit

Permalink
Adds required SSH options
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Dec 17, 2014
1 parent 05a7f9c commit 4ccc0b6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions reprounzip-vagrant/reprounzip/unpackers/vagrant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,16 @@ def run_interactive(ssh_info, interactive, cmds):
ssh_exe = None

if interactive and ssh_exe:
return subprocess.call([ssh_exe,
'-i', ssh_info['key_filename'],
'-p', '%d' % ssh_info['port'],
'%s@%s' % (ssh_info['username'],
ssh_info['hostname']),
cmds])
return subprocess.call(
[ssh_exe,
'-t', # Force allocation of PTY
'-o', 'StrictHostKeyChecking=no', # Silently accept host keys
'-o', 'UserKnownHostsFile=/dev/null', # Don't store host keys
'-i', ssh_info['key_filename'],
'-p', '%d' % ssh_info['port'],
'%s@%s' % (ssh_info['username'],
ssh_info['hostname']),
cmds])
else:
# Connects to the machine
ssh = paramiko.SSHClient()
Expand Down

0 comments on commit 4ccc0b6

Please sign in to comment.