~fo0bar/turku/turku-agent-encoding

« back to all changes in this revision

Viewing changes to turku_agent/ping.py

  • Committer: Ryan Finnie
  • Date: 2015-05-12 23:46:06 UTC
  • mfrom: (40.2.4 turku-agent)
  • Revision ID: ryan.finnie@canonical.com-20150512234606-w3rn22hl2qa0bis1
MergeĀ lp:~fo0bar/turku/turku-agent

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    ssh_command = config['ssh_command']
49
49
    ssh_command += [
50
50
        '-T',
 
51
        '-o', 'BatchMode=yes',
51
52
        '-o', 'UserKnownHostsFile=%s' % t.name,
52
53
        '-o', 'StrictHostKeyChecking=yes',
 
54
        '-o', 'CheckHostIP=no',
53
55
        '-i', config['ssh_private_key_file'],
54
56
        '-R', '%d:%s:%d' % (ssh_req['port'], config['rsyncd_local_address'], config['rsyncd_local_port']),
55
57
        '-p', str(storage['ssh_ping_port']),
63
65
    p.stdin.write(json.dumps(ssh_req) + '\n.\n')
64
66
 
65
67
    # Wait for the server to close the SSH connection
66
 
    p.wait()
 
68
    try:
 
69
        p.wait()
 
70
    except KeyboardInterrupt:
 
71
        pass
67
72
 
68
73
    # Cleanup
69
74
    t.close()