SSH configuration fileVi/etc/ssh/sshd_configPutty DownloadHttp://www.chiark.greenend.org.uk/~sgtatham/putty/download.htmlPublic key encryption, private key decryptionOpen Puttygen Click genenrate Generate Public keySet the passwordSave private key to PC by clicking on Save p
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
using key verification can effectively solve these security risks, > You have to create a pair of keys for yourself and place the public key on the server you need to access. If you are connecting to an SSH server, the client software makes a request to the server requesting security verification with your
transfer the content of pub to authorized_key. Pub files are useless.1. Use CRT to generate a key pair and upload the public key to linuxA. After successful login, the Public Key in the cpoyA machine is sent to machine B, so that the CRT can automatically log on to machine B and verify that the public key is universal
emotional configuration of the user to use, the profile is ~/.ssh/config (the file does not exist, please create), the format is as follows:
Host xxxxIdentityfile private Key file namePort Port numberUser you log in to XXXX server accountNote: The configuration file here can also refer to the configuration in Ssh_config, and can be used to get more useful infor
the same key to log on to the ssh server.
Test Environment: secureCRT client is used in windows, and two redhat 6.3 virtual machines (linuxA and B, 192.168.1.2/3) are deployed ). The VM and the host use a bridging network and are in the same LAN.
Test process:
Note: The public key generally ends with pub, but the file verified by the server is authorized_key.
key on my machine ~ /. Ssh/directory and ensure that the access permission is "-RW -------" (that is, 600 ). Then place the generated public key on the remote host to be connected ~ The/. Ssh/directory is renamed as authorized_keys, and the file is not authorized to be modified except for the owner.4. Configure SSHCon
under "C:\Users\ username. SSH",2. Manage multiple SSH keys generated by gitProblem descriptionWhen you have more than one Git account, such as a GitHub, for some of your own development activities, a gitlab, typically a git inside the company. If your mailbox is different, it will involve a problem, and the first key will be overwritten when you generate the se
Method 1:
In the following example, ssky-keygen and SSH-copy-ID can be used to log on to a remote Linux host without a password.Ssh-keygen creates the public key and key.Ssh-copy-ID copies the public key of the local host to the authorized_keys file of the remote host.The SSH-copy-ID will also be sent to the user home
Generally, when you log on to the remote server through ssh, use password authentication and enter the user name and password respectively. The two can log on only when they meet certain rules. However, password authentication has the following Disadvantages:
The user cannot set a blank password (even if the system allows a blank password, it is very dangerous)Passwords are easy to peek at or guess.If an account on the server is to be used by multiple
Ubuntu 9.10 is newly installed. To better use Ubuntu, You need to configure it better.
----------------------------------------
I am used to centos, so it is not suitable to add the sudo when using Ubuntu, And the folder access
There are also restrictions, so I think using the root account to log on, the method is as follows:Sudo passwd root can set the password for the root user twice.----------------------------------
Ubuntu VI does not support direction keys and backspace keys. Therefore, you
Use SSH to log on to the remote host and provide the private key id_rsa.rsa.
ssh-lhust_fmliu-iid_rsa.rsaplanetlab1.xeno.cl.cam.ac.uk
The following error occurs:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@WARNING:UNPROTECTEDPRIVATEKEYFILE!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Permissions0644for‘id_rsa.rsa‘aretooopen.Itis
SSH key logon makes centos servers in VPS more secure
As PHP becomes more and more popular, Linux VPS/servers are used more and more, and Linux security issues need to be strengthened. If you have installed DenyHosts and set up email reminders, you may receive several DenyHostsReport messages every day to add the IP address that is used to crack the SSH password
/id_rsa): Created directory ‘/home/hadoop/.ssh‘.Your identification has been saved in /home/hadoop/.ssh/id_rsa.Your public key has been saved in /home/hadoop/.ssh/id_rsa.pub.The key fingerprint is:c6:ae:f2:7b:d1:54:eb:30:c3:ee:a1:ea:89:14:da:97 [emailprotected]_32_234_centos
can get the Yii open source framework by: git clone [email protected]:yiisoft/yii2.git and git clone https://github.com/yiisoft/yii2.gitAppendix: Git and OpenSSH preinstalled on Mac Ssh--secure Shell (Secure Shell Protocol)SSH is based on the application layer and Transport layer, the default port is 22, for remote login sessions and other network services to provide security protocols.
As PHP becomes more popular, Linux vps/servers are used more and more, and Linux security issues need to be enhanced, if you install denyhosts and set up email reminders, you may be subject to several letters each day denyhosts The reporting will come to break the SSH password IP join/etc/hosts.deny.
There are two types of Linux ssh logins:
1, the use of password Authentication login
Typically, a VPS or
Set the HOME environment variable to modify the ssh-key Path found by git by default, gitssh-key
Edit the profile file in the etc directory under the git installation directory. For example:E: \ Git \ etc \ profileFind the following line:
# Set up USER's home directoryif [-z "$ HOME"-o! -D "$ HOME"]; then HOME = "$ HOMEDRIVE $ HOMEPATH" if [-z "$ HOME"-o! -D
)
Enter passphrase (empty forno passphrase):
# Repeated password phrase
Enter same passphrase again:
Your identification has been saved in/root/.ssh/id_rsa.
Yourpublic key has been saved in/root/.ssh/id_rsa.pub.
The key fingerprint is:
aa:8b:61:13:38:ad:b5:49:ca:51:45:b9:77:e1:97:e1 root@localhost.localdomain
T
Principle:Key authentication needs to rely on the key, first create a pair of keys (including the public key and the key, and the public key encrypted data can only be decrypted with the key), and put the public
As PHP becomes more and more popular, Linux VPS/servers are used more and more, and Linux security issues need to be strengthened. If you have installed DenyHosts and set up email reminders, you may receive several DenyHosts reports every day to add the IP address that is used to crack the SSH password to/etc/hosts. deny.
There are two types of Linux SSH Logon:
1. Log On with password verification
Generally
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.