@@ -33,15 +33,12 @@ function debug_file_contents {
3333function fetch_remote_os_info {
3434 ruser=$1
3535 rhost=$2
36- ssh -q -i " $( get_bosco_key " $ruser " " $rhost " ) " " $ruser @$rhost " " cat /etc/os-release"
36+ ssh -q -i " $( get_bosco_key " $ruser " ) " " $ruser @$rhost " " cat /etc/os-release"
3737}
3838
3939function get_bosco_key {
4040 ruser=$1
41- rhost=$2
42- if [[ -f $BOSCOKEYS_DIR /${ruser} @${rhost} .key ]]; then
43- echo " $BOSCOKEYS_DIR /${ruser} @${rhost} .key"
44- elif [[ -f $BOSCOKEYS_DIR /${ruser} .key ]]; then
41+ if [[ -f $BOSCOKEYS_DIR /${ruser} .key ]]; then
4542 echo " $BOSCOKEYS_DIR /${ruser} .key"
4643 else
4744 echo " $DEFAULT_BOSCO_KEY "
@@ -58,7 +55,7 @@ setup_ssh_config () {
5855
5956 # copy Bosco key
6057 ssh_key=$ssh_dir /bosco_key.rsa
61- cp " $( get_bosco_key " $ruser " " $remote_fqdn " ) " $ssh_key
58+ cp " $( get_bosco_key " $ruser " ) " $ssh_key
6259 chmod 600 $ssh_key
6360 chown " ${ruser} " : $ssh_key
6461
9087setup_endpoints_ini () {
9188 echo " Setting up endpoint.ini entry for ${ruser} @$remote_fqdn ..."
9289 remote_os_major_ver=$1
93- ssh_key=$( get_bosco_key " $ruser " " $remote_fqdn " )
90+ ssh_key=$( get_bosco_key " $ruser " )
9491 # The WN client updater uses "remote_dir" for WN client
9592 # configuration and remote copy. We need the absolute path
9693 # specifically for fetch-crl
@@ -126,12 +123,12 @@ REMOTE_HOST_KEY=`ssh-keyscan -p "$remote_port" "$remote_fqdn"`
126123root_ssh_dir=/root/.ssh/
127124mkdir -p $root_ssh_dir
128125chmod 700 $root_ssh_dir
129- ln -s " $( get_bosco_key " root" " $remote_fqdn " ) " $root_ssh_dir /bosco_key.rsa
126+ ln -s " $( get_bosco_key " root" ) " $root_ssh_dir /bosco_key.rsa
130127
131128cat << EOF > /etc/ssh/ssh_config
132129Host $remote_fqdn
133130 Port $remote_port
134- IdentityFile "$( get_bosco_key " root" " $remote_fqdn " ) "
131+ IdentityFile "$( get_bosco_key " root" ) "
135132 ControlMaster auto
136133 ControlPath /tmp/cm-%i-%r@%h:%p
137134 ControlPersist 15m
0 commit comments