db2locssh - Run commands on a remote host as user root

The db2locssh command is an independent tool that is used run commands on a remote host as user root.

The db2ssh is installed in the /var/db2/db2ssh directory. It consists of three executable:
  • db2locssh, which is invoked on the local host
  • db2remssh, which the db2locssh program invokes on the remote host, starting version 12.1.3.0, db2remssh is located at /opt/ibm
  • db2scp, which uses both the db2locssh and db2remssh files
Note: Support for the sftp protocol with db2scp is added in Db2 version 12.1.3.0. If the file /etc/ssh/disable_scp exists, db2scp will use the sftp protocol for file transfer. The scp command line utility is required for db2scp, regardless of which file transfer protocol is used.

Authorization

Root

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagramdb2locssh generate_keys?-keysizekeysize-exponentexponentversionreset_configdisplay_configset_gskit_pathpath-to-gskitdiscover_gskitset_time_deltatime-delta-in-secondsset_debug_level12set_db2sshidssh-idset_fips_modeonoffroot@<host>command

Command parameters

generate_keys
Generates a pair of private and public keys on the host that the db2locssh command is executed on. The default value of keysize is 2048. If you want to specify a key size and exponent, you must use the -keysize and -exponent options.
version
Returns the current db2locssh version used on the local host.
reset_config
Reset the db2locssh configurations.
display_config
Display the current db2locssh configurations.
set_gskit_path
Specifies the file path to IBM Global Security Kit (GSKit) packages.
discover_gskit
Attempts to locate IBM Global Security Kit (GSKit) packages on an installed Db2® instance.
set_time_delta
Configure the amount of time allowed to elapse between issuing a command on the local host and receiving the command on the remote host. The unit of the provided value must be seconds. Default is 0 which means this check is disabled.
set_debug_level
1
Only log errors in the system log.
2
Log errors and debug information in the system log.
set_db2sshid
Set the ID that the current host uses to establish an SSH connection to other hosts in the cluster.
set_fips_mode
off
Disable the Federal Information Processing Standard (FIPS) off. This is the default setting.
on
Enable FIPS.
root@<host>
Run command on <host> as user root.