@@ -33,15 +33,12 @@ function debug_file_contents {
33
33
function fetch_remote_os_info {
34
34
ruser=$1
35
35
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"
37
37
}
38
38
39
39
function get_bosco_key {
40
40
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
45
42
echo " $BOSCOKEYS_DIR /${ruser} .key"
46
43
else
47
44
echo " $DEFAULT_BOSCO_KEY "
@@ -58,7 +55,7 @@ setup_ssh_config () {
58
55
59
56
# copy Bosco key
60
57
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
62
59
chmod 600 $ssh_key
63
60
chown " ${ruser} " : $ssh_key
64
61
90
87
setup_endpoints_ini () {
91
88
echo " Setting up endpoint.ini entry for ${ruser} @$remote_fqdn ..."
92
89
remote_os_major_ver=$1
93
- ssh_key=$( get_bosco_key " $ruser " " $remote_fqdn " )
90
+ ssh_key=$( get_bosco_key " $ruser " )
94
91
# The WN client updater uses "remote_dir" for WN client
95
92
# configuration and remote copy. We need the absolute path
96
93
# specifically for fetch-crl
@@ -126,12 +123,12 @@ REMOTE_HOST_KEY=`ssh-keyscan -p "$remote_port" "$remote_fqdn"`
126
123
root_ssh_dir=/root/.ssh/
127
124
mkdir -p $root_ssh_dir
128
125
chmod 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
130
127
131
128
cat << EOF > /etc/ssh/ssh_config
132
129
Host $remote_fqdn
133
130
Port $remote_port
134
- IdentityFile "$( get_bosco_key " root" " $remote_fqdn " ) "
131
+ IdentityFile "$( get_bosco_key " root" ) "
135
132
ControlMaster auto
136
133
ControlPath /tmp/cm-%i-%r@%h:%p
137
134
ControlPersist 15m
0 commit comments