Remotely log on to a Linux host using an SSH client (alternative to samba and ftp services)

Source: Internet
Author: User
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: SSH (SecureSHell )...
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:

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.

Enter the IP address and user name of the remote host, Click connect, and enter the user password to go to the interface shown in:
This 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)
192.168.222.1: The 1057 port number after 1057 is randomly allocated to the windows system when logging on via the SSH client in windows (3) two system shared files click the following button on the SSH client, as shown in Figure 5:
Then the FTP-like interface appears, as shown in Figure 6: www.2cto.com
In this way, files can be shared between the two. (4) force disconnection of SSH users from Linux hosts. sometimes, if you do not want an SSH user to use a 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.
Then 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 ).

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.