问题:安装greenplum集群,执行gpssh-exkeys -f 报错
环境:CentOS7.8 端口是10022
问题分析,主要是gpssh-exkeys默认是22端口,将其中的一些命令改加上端口
问题截图:
处理办法:
打开gpssh-exkeys脚本,
修改一:
errfile = os.path.join(tempDir, 'sshcheck.err')
cmd = 'ssh -p 10022 -o "BatchMode=yes" -o "StrictHostKeyChecking=no" %s true 2>%s' % (hostname, errfile)
修改二:
for remoteHost in GV.allHosts:
cmd = ['ssh','-p','10022','[email protected]'+ remoteHost.host(), '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=yes', 'true']
修改三:
cmd = ('scp -P 10022 -q -o "BatchMode yes" -o "NumberOfPasswordPrompts 0" ' + '%s %s %s %s %s:.ssh/ 2>&1' % (remoteAuthKeysFile, remoteKnownHostsFile, remoteIdentity, remoteIdentityPub, canonicalize(h.host()))) h.popen(cmd)
修改四:
for h in GV.newHosts:
cmd = ('scp -P 10022 -q -o "BatchMode yes" -o "NumberOfPasswordPrompts 0" ' +
'%s %s %s %s %s:.ssh/ 2>&1'
% (GV.authorized_keys_fname,
GV.known_hosts_fname,
GV.id_rsa_fname,
GV.id_rsa_pub_fname,
canonicalize(h.host())))
h.popen(cmd)