On Linux systems, OpenSSH is currently the most popular remote system login and file transfer application, and is also a replacement for traditional Telenet, FTP and R series network applications. Among them, ssh (Secure Shell) can replace telnet, rlogin and rsh, scp (Secure Copy) and sftp (Secure FTP) can replace ftp.
OpenSSH uses a key to encrypt data to ensure data transmission security. Before the data is officially transmitted, the two parties first exchange keys, and when they receive the data of the other party, they use the key and the corresponding program to decrypt the data. This encrypted data transmission helps prevent illegal users from obtaining data information.
OpenSSH generates public and private keys in a random manner. The key is usually generated only once and can be recreated if necessary.
When using the ssh command to log in to a remote system, the OpenSSH server's sshd daemon will send a public key, and the OpenSSH client software ssh will prompt the user to confirm whether to receive the transmitted public key. At the same time, the OpenSSH client also sends back a key to the server, so that each system on both sides of the OpenSSH connection has the other party's key, thus being able to decrypt the encrypted data sent by the other party via the encrypted link.
The public and private keys of the OpenSSH server are stored in the /etc/ssh directory. On the OpenSSH client, all public keys received by the user and the IP address of the OpenSSH server providing the key are stored in the ~/.ssh/known_hosts file in the user's home directory (.ssh is a hidden directory). If the key does not match the IP address, OpenSSH will think that something is wrong. For example, reinstalling the operating system or upgrading OpenSSH will cause the system to generate new keys again, and malicious network attacks will also cause key changes. Therefore, when the key changes, you should always understand the reason for the key change to ensure data security during network access.
1 Installing OpenSSH Server
In Ubuntu, the OpenSSH client is installed as a base system software with this system, but the OpenSSH server needs to be installed separately. Install the openssh-server server package and use software tools such as apt-get, aptitude or synaptic.
$ sudo apt-get install openssh-server
After installation, you can use the following command to verify that the OpenSSH server's sshd daemon is enabled.
$ pidof sshd
2 Logging in to a remote system using SSH
In OpenSSH, ssh is an important client application. With ssh, you can log in to the remote system using encrypted communication. The syntax is as follows:
ssh [options] [-l login_name][user@]hostname [command]
The &lquo;-llogin_name” option is used to specify the username to indicate which user is logged in to the remote system. If you do not provide a username, log in to the remote system as the current user. For example, the following command form means to log in to the remote system as the webgod user with the default 22 port (note, here) Welcome to Ubuntu 12.04 LTS (GNU/Linux) ……https://helo.ubunut.com /” from /etc/motd file). In addition to the ”-l” option, in order to log in to the remote system as another user, you can also log in to the remote system using ”user@hostname”.
burning system disk must have two conditions. 1: The computer comes with a CD or DVD burner 2: The d
Many users are still using dial-up Internet access, but after each boot, they need to open a broadba
In the process of using the u disk, it will inevitably encounter some problems, such as how to solve
Using windows system friends in addition to the own screenshot function and use qq many screenshot m
Unix tools under windows unxutils
YunOS5.0 updated what Alibaba Cloud os December 10 release live broadcast
How to protect privacy The correct handling of the address bar is the key
How does the printer scan files to the computer?
How to log in on WeChat web version?
Comprehensive analysis of all types of startup and shutdown class failures
How to solve the high svchost.exe occupancy rate?
Sharing the secret of letting the system stop crashing
Method of making X.509 certificate using OpenSSL tool and summary of its precautions
Have you used the shortcut keys for Windows 7?
Speech recognition Let's use the mouth to command Win 7
How to use rmdir command guide in Linux
Teach you how to check the hardware configuration of the computer
Windows system pseudo-optimization skills analysis and application
There is no sound after upgrading Win10 system. How to do win10 without sound solution
U disk Chinese characters garbled problem under Linux system
How to close Win10 virus protection? How to turn off virus protection