RE: hi (php-SSH)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can use putty. PuTTY is a free implementation of Telnet and SSH for
Win32 platforms, along with an xterm terminal emulator. You can download
from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Good luck
Nato

-----Original Message-----
From: otherguy [mailto:otherguy@other-net.net]
Sent: Tuesday, July 29, 2003 12:34 AM
To: David Smith
Cc: php-db@lists.php.net; suman@bacbarcodes.com
Subject: Re:  hi (php-SSH)



On Monday, July 28, 2003, at 10:19  PM, David Smith wrote:

> Suman Aluru wrote:
>
>> hi ,
>>  is there any way to write a PHP program for SSH.
>> I want to establish a SSH connection and work some commands in the
>> remote system and close the connection.
>>
>
> Yes, just do this (uses an SSH key file):
>
> <?php
>    echo "Executing remote command...<br />";
>    echo `ssh -i /path/to/key/file user@host ls /tmp`;
>    echo "Done executing remote command.<br />";
> ?>
>
> Use an SSH key file so you won't have to provide a password. I do this
> all the time for system administration, works great for inter-host
> communication.

If you're going to go this route, I would suggest that you read up on
the security issues inherent in using a non-passworded key file - and
make sure that the privileges on the remote host are set accordingly.

-Cameron Wilhelm


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux