RE: [PHP] Howto send command over ssh using sockets

From: Date: Mon, 05 Apr 2010 07:56:46 +0000
Subject: RE: [PHP] Howto send command over ssh using sockets
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-303831@lists.php.net to get a copy of this message
Hello, thank you for response, more in you text: Instead of ssh, you could use telnet to connect to the Cisco router (which incidentally runs on port 23, but is likely to be disabled on I want to use my script against FreeBSD router and against RouterOS so I need ssh. I can use system function to call ssh command, but I can try it over php tools. Or if you do not like the idea of sending clear-text passwords to the router, you might want to learn about proc_open() (or popen()) and use the native ssh utility that most likely is present on the server, taking great care to READ THE MANUAL for the ssh command, because you most likely do _not_ want it to spit out ANSI-escapes to you script. It will be probably better way than system function. If I fail with using sockets I use this. Thank you very much. Radek

« previous php.general (#303831) next »