TTY needs to be turned off so that Zero Downtime Migration can run commands on the remote hosts non-interactively.
Because there are many ways to set sudo privileges, there are many ways to disable TTY for the zdmuser
. As an example, you could set the following default in /etc/sudoers
file.
Defaults:zdmuser !requiretty
Run the following command to verify that TTY is disabled:
ssh -i zdm_service_host_private_key_file_location
user@source_database/target_database_server_name
"sudo_location_source/target_database /bin/sh -c date"
If TTY is disabled, the command above returns the date from the remote host without any errors.
Optionally, if SSH is configured to require TTY, the output shows an error, such as the following:
[opc@zdm-server ~]$ ssh -i /home/zdmuser/.ssh/zdm_service_host.ppk opc@ocidb1
"/usr/bin/sudo /bin/sh -c date"
sudo: sorry, you must have a tty to run sudo
Note:
Usage of
sudo
is optional here.