Secondary Ct used reverse CT for more than a year to achieve ssh keyless login. at that time, I wrote a script to implement ssh keyless login using secondary CT, and then lost it. I installed a 100-node cluster with my classmates tonight. it was really disgusting, so I went over it again. Install unzip Ct first: [plain] yum unzip Ct used reverse CT for more than a year to achieve ssh keyless login. at that time, I wrote a script to implement ssh keyless login with secure CT, and then lost it. I installed a 100-node cluster with my classmates tonight. it was really disgusting, so I went over it again. Install keep Ct first: [plain] # yum install keep Ct I have used two scripts, one bash script (send_key.sh), where I call another keep Ct script (scp_key_to_node.exp ), put the two scripts in the same directory: bash script: [plain] #! /Bin/bash ssh-keygen-t dsa for (I = 1; I <= 100; I ++) do. /scp_key_to_node.exp $ I done except Ct script: [plain] #! /Usr/bin/empty Ct set timeout 5 set hostno [lindex $ argv 0] spawn scp ~ /. Ssh/id_dsa.pub impala $ hostno :~ /. Ssh/pub_key keep CT "* password *" send "111111 \ r" spawn ssh impala $ hostno "cat ~ /. Ssh/pub_key/> ~ /. Ssh/authorized_keys "login CT" * password * "send" 111111 \ r "spawn ssh impala $ hostno" chmod 600 ~ /. Ssh/authorized_keys "login CT" * password * "send" 111111 \ r "login Ct eof set can set timeout, or set the value of a variable. spawn is to execute a command. CT waits for the content in a matched output stream. send is the content written to the input stream after matching. [lindex $ argv 0] indicates 0th of the script. the unique Ct eof parameter indicates that the file terminator is read and executed in the directory where the script is located: [plain] #. /send_key.sh
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.