• [^] # Re: .

    Posté par . En réponse au message popen / pclose. Évalué à 1.

    donc je peux pas faire grand chose ?

    Si, lire le man de SSH.

    -> utilise une authentification SSH par clé, soit sans passphrase (c'est pas bien), soit avec une passphrase (et dans ce cas là tu peux utiliser ssh-agent pour la taper une seule fois, et en dehors du programme)

    -> regarde du côté des paramètres -f et -n de SSH :

    -f
    Requests ssh to go to background just before command execution. This is useful if ssh is going to ask for passwords or passphrases, but the user wants it in the background. This implies -n. The recommended way to start X11 programs at a remote site is with something like ssh -f host xterm.
    -n
    Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background. A common trick is to use this to run X11 programs on a remote machine. For example, ssh -n shadows.cs.hut.fi emacs & will start an emacs on shadows.cs.hut.fi, and the X11 connection will be automatically forwarded over an encrypted channel. The ssh program will be put in the background. (This does not work if ssh needs to ask for a password or passphrase; see also the -f option.)