Menu

#24 On/off parameter for SSH tunneling

2.0
open
nobody
None
2016-04-12
2016-03-22
No

Hi Borek,

I like to propose a switch to disable the SSH tunneling in the corresponding methods, e.g. AllocateJobWithJobmanager.

In trusted networks, this kind of encrypted data transfer might not be necessary. A disabling opportunity would ease the setup and reduce the platform overhead.

My inofficial reason to propose it, is the easier way to debug a remote interface. No hanging SSH tunnels to kill each time ... ;)

Regards,
Ralph

Discussion

  • Vit Smilauer

    Vit Smilauer - 2016-03-30

    Hi Ralph,
    I use the approach already defined in
    def sshTunnel(remoteHost, userName, localPort, remotePort, sshClient='ssh', options='', sshHost='', Reverse=False)

    setting sshClient='manual' creates no SSH tunnels. A user has to open/close the tunnel externally. The argument sshClient enters allocateApplicationWithJobManager() or allocateNextApplication() and is passed further to sshTunnel().

    You may check this funcionality in Example06-JobMan/scenario.py when setting cConf.sshClient='manual'.

    Vit & Borek

     
  • Ralph Altenfeld

    Ralph Altenfeld - 2016-04-05

    I was thinking of a scenario without SSH tunneling at all and with using the job manager functionality.

    Ralph

     
  • Vit Smilauer

    Vit Smilauer - 2016-04-08

    Dear Ralph,
    I got your point. I modified both examples Example06 and Example06-JobMan so no ssh tunnels are created. You can check that functionality if you turn in both server/client scripts an option noSSH=True. This means in principle two things:

    • both server's IP and serverNathost's IP must equal to '127.0.0.1'. We stay now on one local machine.
    • serverPort and serverNATport must be the same so an application requests the same port as running server's daemon.
    • in case of JobManager, one connection goes to JobManager according to the items above. Since JobManager assigns a new communication for a new job, port of job's daemon needs to be passed to an application. This could be done easily when passing jobNatport = -1 so JobMan2cmd.py synchronizes daemon's port with allocated port. Look in Example06-JobMan/scenario.py.

    You should adapt your codes easily according to Example06-JobMan, changing a few lines with different arguments. You have this 0.20.08 version in both git and pip. Hope it helps. Vit

     
  • Ralph Altenfeld

    Ralph Altenfeld - 2016-04-12

    Ok, it works locally ( i.e. Example06_JobMan ). That's sufficient for developing or debugging.
    But it seems not to work remotely. Still an SSH tunnel was tried to set up in that case.
    Ralph

     

Log in to post a comment.