When .bashrc file on any of the node having an interactive shell variable in Greenplum cluster nodes or any sort of interactive prompt can result in gpssh utility to hang indefinitely.
Example:
In sdw2 segment server following interactive commands specified in .bashrc file.
export PS1="[`whoami`@mdwt:$PGPORT:$PGDATABASE]$ " export PROMPT_COMMAND='export PS1="[`whoami`@mdwt:$PGPORT:$PGDATABASE]$ "'
-- ssh commands will work as follows:
[gpadmin@mdw1 njonna]$ ssh sdw2 hostname sdw2
-- gpssh does not work until you remove the variables that caused the problem.
[gpadmin@mdw1 njonna]$ gpssh -h sdw2 hostname Interrupted... [gpadmin@mdw1 njonna]$ gpssh -f all_hosts "hostname" [ERROR] unable to login to sdw2-1 hint: use gpssh-exkeys to setup public-key authentication between hosts Error: Error logging into host sdw2-1
Remove any interactive variables in ".bashrc" on the Greenplum cluster nodes.