Using an SSH client to remotely log on to a Linux host (which can replace samba and ftp services) is initially generated by multiple users. Multiple users can log on to the Linux host to perform operations at the same time, 1:
Figure 1 SSH (Secure SHell) corresponds to a service in linux, that is, sshd. It is generally started by default in linux, you can use setup-> sysyem configure-> sshd to check whether the service can have an SSH client in windows corresponding to www.2cto.com, which can be downloaded online ., This tool supports remote logon, modification, and file upload. It can basically Replace the samba server, FTP, and shared folder functions. In linux, the default listening port number of sshd is 22. After installing the SSH client in windows, you can connect to the Linux host through the SSH client. However, you must first use the ping command in the command line of windows to check whether the IP address of the Linux host can be pinged, if you cannot ping the general rules, you need to set the IP addresses of the two to the same network segment (192.168.222.xxx, this setting is only for the LAN ), if you cannot ping the general rules after setting it to the same network segment, it may be a firewall problem. The problem I encountered is that windows can be pinged to linux, but linux cannot be pinged to windows. This is because windows Firewall is disabled. The following is why I used an SSH client to log on to the Linux host (1) open the SSH client and click QuickConnect, as shown in figure 2.
Figure 2 fill in the IP address and User Name of the remote host. Click connect and enter the user password to go to the page shown in Figure 3:
Figure 3 here is exactly the same as the command line editing environment in linux. You can perform various command operations here. Note: The ssh service is not installed in my linux system by default. The client software will provide some prompts. Therefore, you need to install the service first and execute the following command: www.2cto.com apt-get install openssh-clientapt-get inatall openssh-server after the installation is complete, run the following command to check whether ssh is nearly started: ps-e | grep ssh if you see sshd, it indicates that the ssh service has been started. If not, you can start it like this: sudo/etc/init. d/ssh startssh-server the configuration file is located in/etc/ssh/sshd_config. Here we can define the SSH service port. The default port is 22. You can define it as another port number, for example, 222. Then restart the SSH service: sudo/etc/init. d/ssh stopsudo/etc/init. d/ssh start (2) After remote logon, enter the command netstat-an in linux to view a remote user logon, as shown in figure 4. (Note that two users have logged on to the Linux host)
Figure 4 192.168.222.1: 1057 the 1057 port number is randomly allocated by the windows system when the SSH client is used for Logon in windows (3) Two system shared files click the button below the SSH client, 5:
Figure 5 shows an FTP-like interface, as shown in Figure 6: www.2cto.com
Figure 6. The two files can be shared. (4) force disconnect the SSH user from the Linux host. Sometimes, if you do not want an SSH user to use the Linux host, you can run the kill command on a linux host to kill the corresponding process. The netstat-anp | more (or ps-aux | more) command shows the port number of the process, as shown in 7.
Figure 7 run kill 1879 to disconnect the user whose IP address is 192.168.222.1 (or use kill-9 1879 to forcibly kill the thread)