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 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