I am trying to automate gpg encryption as below. But It doesn't seem to work for some reason.
[user1@host1]$gpg -e -r 17346DBD --yes --batch -o evish.txt vish.txt
gpg: 0302D795: There is no assurance this key belongs to the named user
gpg: vish.txt: encryption failed: unusable public key
Any help is greatly appreciated