DB2默认会使用rsh协议,但是ssh有这数据加密和压缩传输的优点,我们往往会选择ssh来代替rsh协议,不管你是单节点还是dpf的数据库的环境。简单的步骤如下:
- Change ownership to db2 instance id on the directory
chown -R db2inst1:db2grp1 .ssh
- Add to the known_hosts
ssh-keyscan -t rsa dbhost >> known_hosts
- Set DB2 registry variable
db2set DB2RSHCMD=/usr/bin/ssh
- Testing:
db2_all echo hi