capture the characters to wait for input, send is automatically entered the content, note to "\ r" to indicate a newline to confirm the input.
So, this scripting language can be used in a lot of places, under Linux, often need to type the script of content, you can consider using expect to implement automated interactive scripts to replace human repetitive activities.
Supplemental method shell script SSH automatic
Illustration of CentOS6.4 two-way login configuration for SSH password-less Authentication
Configuring SSH without logon verification is very convenient in many scenarios, especially when managing large cluster services, avoiding tedious password verification. On servers with higher security levels, generally, the password settings are more complex. configuring
Linux SSH Usage depth resolution (key login details)The SSH full name Secure Shell, as the name implies, is a very secure shell, and the SSH protocol is a protocol developed by the network Working Group of the IETF (Internet Engineering Task force). SSH's main purpose is to replace the traditional Telnet and R-series c
1. Modify the VI/etc/ssh/sshd_config file1. Modify the default port: the default port is 22 and has been commented out. The comment is removed and changed to another port.2. Disable remote login for the root user: Modify permitrootlogin, Which is yes by default and commented out. The modification is to remove the comment and change it to No.3. permitemptypasswords No. Empty Password user
1. Automatic Ssh/scp method
A is a local host (that is, a machine used to control other hosts);b is a remote host (that is, a controlled machine server), if IP is 192.168.60.110;Both A and B systems are Linux.
To run a command on a:# ssh-keygen-t RSA (three consecutive returns, that is, the public and private keys are generated locally, no password is set)# SSH
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.First, use CRT to generate the key:1. Use SecureCRT to create the private key and Public Key (Set Passphrase can be Set to an empty pa
Objective:Tidy up a long time ago to do offsite backup, data synchronization has the use of SSH password-free through the key to login steps.For security reasons, a simple configuration of the SSH service is requiredDescriptionServer: Servers (or destination machines that store data offsite) or understood as destination addresses in IP trafficClient: Both worksta
Assuming the server IP address is 192.168.1.1, machine name:cluster.hpc.org client IP address is 172.16.16.1, machine name:p470-2.wangrx.sioc.ac.cn Client User Yzhao needs to log on to the server's zhaoy account with no password ssh Implementation principleSSH login using a method known as "Public private key" authentication. The simple explanation of the "Public private Key" authentication method
The latest SSH automatic login solution (RSA) I. preface when you directly connect to the server using ssh, you need to manually enter the password. If you do not need to manually enter the password and automatically log on to the SSH server, that would be nice. After one night of research, I finally got it done. (The
SSH login with no password to use the public and private keys. Linux can be used to generate a public/private key pair with Ssh-keygen, below I take CentOS as an example.There is machine A (192.168.1.155), B (192.168.1.181). Now want to a through SSH password-free login to B
SSH login with no password to use the public and private keys. Linux can be used to generate a public/private key pair with Ssh-keygen, below I take CentOS as an example.There is machine A (192.168.1.155), B (192.168.1.181). Now want to a through SSH password-free login to B
One: SSH schematic diagram is:1, is to allow two Linux machines between the use of SSH does not require a user name and password. Digital signature RSA or DSA is used to complete this operation.2. Model AnalysisSuppose a (192.168.20.59) is a client machine, B (192.168.20.60) is the target machine;To achieve the purpose:A machine SSH
Latest SSH automatic login scheme (RSA)I. PrefaceWhen you connect directly to the server using SSH, you need to enter the password manually. If you can not manually enter the password, and automatically log on to the SSH server, it is cool.After a night of research, finally took care of. (because the old configuration
Use the SSH Public Key for password-free Login
SSH password-less logon requires the public key and private key. In Linux, ssh-keygen can be used to generate public/private key pairs. The following uses centos as an example.There are machines A (10.207.160.34) and B (10.221.32.234 ). Now I want a to log on to B via
write the Xshell in the topic, the specific SSH introduction is put on the last side)Using key login is divided into 3 steps:1. Generate key (public key and private key);2. Place the public key into the server ~/.ssh/authorized_key file;3. Configure the SSH client to log in using the key.1.1 Generate key (public key a
~ / .ssh / id_rsa.pub [email protected]: ~ / #Copy the public key file to the ssh server
ssh [email protected] #Log in to the ssh server with username and password
mkdir .ssh #If the .ssh directory already exists, you can omit th
Linux under SSH client command remote login system detailed1. Remote Login system has two commonly used services telnet and ssh, all belong to the C/s architectureTelnet: Telnet protocol with Port 23/tcpFeatures: Clear text transmission, no encryptionSsh:secure SHell, Port 22/tcp has v1,v2 two versionsFeatures: Host e
not modify permissions and do not execute Ssh-add command for folders and filesCauses a password to be entered after the remote login is set.Of course, you should also pay attention to the configuration file settings and modifications.Good luck ~================================================================There are several ways to copy the public key to the server's ~/.
I have been studying Hadoop recently. I have encountered a headache when I want to build the environment. I used the ssh service to connect to loaclhost In the Ubuntu environment. It took a long time to complete the setup, now I have sorted it out for reference. There are many methods on the Internet to implement ssh password-less login from the master to the sla
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
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.