The use of SSH2 to implement shell automation testing, the actual work encountered very much. Various languages have corresponding libraries to use. For example, the C + + language can use Libssh2;python to use Paramkio libraries and so on. But
PHP remote Copy and execute command
PHP Remote copy files and when executing commands on a remote server, the module used is SSH2, and all subsequent operations are done according to the SSH2 connection handle.
1. SSH2 Module Installation 1.1
{Code ...} the above is my code. The platform I use is lnmp, And the ssh2 extension has been installed normally, because no error is reported using the ssh2_connect function, and I also ensure the Host IP address and user name, the password is
GANYMED-SSH2 IntroductionGanymed SSH-2 for Java is a package that implements the SSH-2 protocol with pure Java. You can use it to connect to the SSH server directly in the Java program.How to useAdd Ganymed-ssh2-build210.jar to the project
The ganymed-ssh2-build210.jar package needs to be introduced.
It is actually very simple. Therefore, you can directly paste the code to speak.
1 package COM. eshore. framework. util; 2 3 4 5 import Java. io. bufferedreader; 6 Import Java. io. file; 7
In windows, how does one install and configure the ssh2 extension in PHP? For example, my current project needs to use commands to remotely connect to other computers. I don't know how to install and configure the ssh2 extension. Can anyone help me?
Ganymed SSH2 remote interactive Command Execution tool that simulates putty, ganymedputty
Next, I will introduce http://blog.csdn.net/doctor_who2004/article/details/47322105:
We simulate remote commands such as putty:
Import java. io.
GANYMED-SSH2 Introduction:
Ganymed SSH-2 for Java is a package that implements the SSH-2 protocol in pure Java. You can use it to connect to the SSH server directly in the Java program. Ganymed SSH-2 supports SSH dialogs (remote command execution
1. First install the server side of SSH on the server. $ sudo aptitude install openssh-server 2. Start Ssh-server. $ sudo/etc/init.d/ssh Restart 3. Confirm that the Ssh-server is working properly. $ NETSTAT-TLP See above this line of output shows
In practice, it is sometimes necessary to remotely start programs on other Linux hosts from the Web management interface, which can be easily met by SSH protocol. In fact, in the Hadoop architecture, this principle is used when the DN is started on
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.