SSH command PGP key

Hi All,

While using ssh command and not able to decrypt the files . if run manually and it working fine . that means connect to server and running the pgp command.

ssh devtesting@198.120.190.34 'cd /home/test/load; pgp --decrypt --passphrase "pstestingThe" --input *'

Cloud please help me how to resolve it , and my question is it possible to run pgp command using SSH .

Any luck?

Any errors / messages / undesired behaviour? Compare interactive run and remote run and post differences...

i am getting the below error
Bash -s pgp command not found

Difficult to believe that "if run manually and it working fine"...

So - is it installed on the remote system? Is it on the PATH so the shell can find it?

yes, it has installed on path and getting the below error

bash : pgp : command not found

Close to impossible. If installed and on the PATH , bash wouldn't say that.

1 Like

Bash reads different initialization files depending on whether it is interactive and whether it is a login shell. When you log in by hand and type pgp you will be in an interactive login shell. When you provide commands on the ssh command line you are switching to a non-interactive shell. The PATH to pgp is probably set up in one of the initialization files that is only read by interactive shells. The simplest fix would be to specify the full path to pgp. Alternatively try sourcing the files that bash loads automatically when started interactively.

@Wish thanks for quick reply.
Cloud you please help me ,how to specify the full path pgp or sourcing the files that bash loads automatically when started interactively.

please modify the my script

Log into the machine interactively enter type pgp to find the full path to pgp. Use that to replace pgp in your script.

@Wish ...Thanks lot it is working fine... thanks a million