SSH operates a file on the remote machine!

xiaoxiao2021-03-06  118

One: The conditions are as follows:

There is a remote computer: IP is: 221.13.45.201 The reference name (Server) is a machine in the local area network where this machine is located: IP is: 192.168.11.1 The reference name (Host) only Server can pass the Internet access,

The operation content is.

1. Copy files to the Host machine. 2. Install the file on the HOST machine.

First copy the file from my machine to Server, then copy it to the Host machine to execute it; copy file has J2SDK: file name is J2SDK-1_4_2_04-linux-i586.bin, and a Tomcat file, named : jakarta-tomcat-4.1.29.tar.gz Copy the files on my local machine to the / home / lze / directory in the server through the SSH Secure File Transfer Client client software.

Log in to HOST via SSH, use the SSH Secure Shell Client client.

First log in to 221.13.45.201 This machine is as follows: SSH 221.13.45.201 After logging in, use SSH to enter 192.168.11.1 as follows:

SSH 192.168.11.1

After inputting, you will call you password. If you enter your password, you will enter 192.168.11.1 This machine, the entire process is like this:

Bash-2.04 # ssh 192.168.11.1root@192.168.11.1's password: Last Login: fri oct 29 09:12:27 2004 from 192.168.0.223 [root @ lanweb root] #

The above will be displayed after success

Last login: fri oct 29 09:12:27 2004 from 192.168.0.223 [root @ lanweb root] # information.

Now copy the file to the host from the Server machine. We first entered the / home directory on the HOST machine,

[root @ lantweb root] # cd .. [root @ lanweb /] # [root @ lanweb root] # CD / home [root @ lanweb home] #

Ok, now we have entered the / home directory, you can build a folder in this folder first here. Use the command: mkdir dirname to create a folder. Suppose we have created the folder named Soft [ Root @ lanweb home] # mkdir soft

[root @ lanWeb Home] # CD Soft creates a good after using the ls command, it will find that there is a Soft folder in the home directory, go in with the CD command, it is empty, no content, ok, now we start Copy the file to this Soft directory and use the following command:

[root @ lanWeb Soft] #scp -p 2222 root@221.13.45.201: /Home/LZE/J2SDK-1_4_2_04-Linux-i586.bin.

This means that copying the J2SDK-1_4_2_04-linux-i586.bin file under the 221.13.45.201 machine to the current directory, pay attention to the last one of this command "." Dot, this The dot indicates the current directory.

Enter a prompt after entering the above command, that is, the password of the machine is required to log in to 221.13.45.201. After entering the correct, you can see that the file is copied to / home / Soft / Directory. Next use the same Method copies the Tomcat file to / home / Soft / Directory,

2, start installing the software.

Unducained ............................................... ........


New Post(0)