Nevím co s tím. Potřebuju se přez php spojit sshckem na server a zadat příkazy. Na linuxu mi to funguje s shellovým scriptem ale na woknech tohle nejde. Zkusil jsem tedy program plink. Zapíšu přikazy do souboru a pak plink spustím execem tak aby se připojil a přečetl příkazy z toho souboru.
Jenže mi to nefunguje. Tak sem zkontroloval log apache a vypadá takto:
Kód:
[Tue Jul 25 13:34:18 2006] [notice] Parent: Received restart signal -- Restarting the server.
[Tue Jul 25 13:34:18 2006] [notice] Child 2072: Exit event signaled. Child process is ending.
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's dss key fingerprint is:
ssh-dss 1024 56:74:2c:d0:50:22:68:00:0a:53:a4:3f:ba:5b:8d:dd
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's dss key fingerprint is:
ssh-dss 1024 56:74:2c:d0:50:22:68:00:0a:53:a4:3f:ba:5b:8d:dd
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's dss key fingerprint is:
ssh-dss 1024 56:74:2c:d0:50:22:68:00:0a:53:a4:3f:ba:5b:8d:dd
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's dss key fingerprint is:
ssh-dss 1024 56:74:2c:d0:50:22:68:00:0a:53:a4:3f:ba:5b:8d:dd
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n)
Z nějakého důvodu se výstup programu zapisuje do logu serveru. Zkusil jsem i funkci passthru i popen ale stejně se výstup zapisuje do logu. Je nějaká možnost jak to obejít? Nebo i případně programu poslat y aby mohl pokračovat?