First, the principle of introduction: 1, the basic principle of SSH public key authentication:SSH is a protocol designed to provide security for Telnet sessions and other network services. By default, SSH links require password authentication and can be modified by adding system authentication (i.e., public-private key), and switching between systems can avoid password entry and
First, the experimental environmentThis experiment needs at least two machines, this article uses three machines to explain.
Server
Ip
is the distribution machine
Nfs-server
10.0.0.11
Is
web-client01
10.0.0.12
Whether
web-client02
10.0.0.13
Whether
Ii. Steps of implementation1. Add the System account (i.e. the normal user)Three machines were used, one for the distribution machine and t
When you enable the SSH service, you will sometimes see the following prompt:
[email protected]:~#/etc/init.d/ssh Start
* Starting OpenBSD Secure Shell server sshd
Could not load host key:/etc/ssh/ssh_host_rsa_key
Could not load host key:/etc/ssh/ssh_host_dsa_key
There are two tips for Could not lo
In linux, root users are prohibited from using ssh to log on and access control over ssh. in Linux, by default, root users can log on through ssh. However, for security reasons, this permission is inappropriate because hackers may crack your root password by brute force and then enter your system. oh, damn it ..... for security reasons, we usually operate on linu
The security of the server is self-evident, the first step in server security setting is to block the portal.
For Linux, blocking the entrance, is not allow others to casually into our servers inside the mess, otherwise an order "RM-RF/", the consequences of unimaginable. So we can't let people into our servers, and we can't let others use the root user. So the best thing to do is:
On Linux, set to prevent root remote logins, and modify the SSH port
:
Sudo apt-getinstall openssh-Server
(View the returned results. If no error occurs, use the SSH client software such as putty, securecrt, and SSH Secure Shell client to enter the IP address of your server. If everything is normal, you can connect later. And you can log on with the existing user name and password .)
Then confirm whether sshserver has started: (or use the "netstat-TLP" command)
PS-E | gre
1. SSH client generates key1$Ssh-keygen-T Rsa-b40962Generating public/private RSA key pair.3Enterfile inch whichTo save the key (/users/(username)/.SSH/id_rsa): Vagrantid_rsa4Enter Passphrase (empty forno passphrase):5 Enter same passphrase again:6Your identification has been savedinchVagrantid_rsa.7Your public key has been savedinchvagrantid_rsa.pub.8 The key fi
]: Exiting on Signal 15Mar 07:50:14 localhost sshd[4587]: Pam_unix (sshd:session): Session closed for user rootMar 06:35:05 localhost sshd[4212]: Server listening on:: Port 22.Mar 06:35:05 localhost sshd[4212]: Server listening on 0.0.0.0 Port 22.Mar 06:39:34 localhost sshd[4607]: Address 192.168.1.18 maps to localhost, but this does no map back to the address- POSSIBLE break-in attempt!Mar 06:39:34 localhost sshd[4607]: Pam_unix (Sshd:auth): Authentication failure; Logname= uid=0 euid=0 tty=
about this feature in Chapter 8 and 9 of the Putty manual.
4. Connection Transfer
Sometimes you may need to connect to another server from one server, for example, directly transferring data between two servers, instead of using a local computer:
www1 $ scp -pr templates www2:$PWD
(By The Way, $ PWD is useful when you need to copy files between two servers ), because even if you have added the public key of your local computer to two servers, scp will still prompt you to enter the password by d
:a2:db [emailprotected]
Next, add the key you just created to the SSH-agent and execute the following two commands.
# start the ssh-agent in the backgroundeval "$(ssh-agent -s)"# Agent
The general content is as follows:
Local port forward -- create a port locally and use SSH for forwarding
Ssh-l 8888: localhost: 8888 username @ codemonkey1
This command is executed on the client machine.
We need to access port 8888 of codemonkey1, which runs on a web application, but this application only allows access from localhost (for security reasons). Now we are outside China, to access this webpage,
How to set the ssh connection timeout (ssh timeout)
This article describes how to set the ssh connection timeout in linux to avoid force exit. For more information, see.
I have introduced a lot about how to modify the ssh connection timeout.
For example:This can reduce the time-out waiting for
identification has been saved in /. ssh/id_rsa. your public key has been saved in /. ssh/id_rsa.pub.
2. Add a public key to the Trust List~ /. Ssh $ cat 192.168.1.101> authorized_keys~ /. Ssh $
3. Start ssh-agent (previous steps)
SSH connection can remotely manage devices such as Linux, the default LINUXSSH port is 22 port, How to modify the SSH default port, how to increase the SSH port? , let me show you a little bitTools/Materials
Xshell Putty and other Remote Tools Linux systems
What is SSH?
1SSH to Secure ShellDevelo
Https://www.visualstudio.com/zh-cn/docs/build/actions/agents/v2-windowsLast update:6/27/2017In this article
Learn about Agents
Check Prerequisites
Prepare Permissions
Decide which user you ' ll use
Confirm the user has permission
Download and configure the agent
Server URL
Authentication type
Choose Interactive or service mode
Replace an agent
Re
Batch configure SSH mutual trust script and ssh mutual trust script
During large-scale automated deployment, we often need to configure SSH mutual trust on the server so that the automated script can log on to the remote server without password. The general steps to manually configure SSH mutual trust are as follows:
A slow connection occurs when using an SSH client to connect to another Linux server on Linux. But to change a client to even find the speed is normal. Assume that the SSH client appears as a problem.So using ssh-v IP debugging, sure enough to find the problem. The output is as follows:[Email protected] ~]# ssh-v 10.60
Secure login with key for SSH [Ssh+pam+putty]
Author: Shaozong [Scott Siu]E-mail:scottsiuzs@gmail.comHave seen a lot about SSH key to log in the article, a lot of points in the incomplete, I am here to tidy up.System PlatformServer: SLES 9.3Client: Window XPRHEL 4 as 4.0Notes1. Putty Generation Key (Window)Download the Putty Component http://www.chiark.greenend.
transferred is consistent, do not transmit otherwise transmission. The target object of this command is a directory. An example:5 SSHthe agentwe transmit the data want to encrypt, but the original remote transfer tool does not have encryption function, then we can use ssh as middleware to assist the encryption, here we are ssh assist telnet tool to transfer data. Here we assume an environment where conditi
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.