I have a db server where I am sshing into and I am running the command “sudo -u oracle -H bash” and I am able to validate that successfully by doing this manually but I am trying to do the same process using bash script so I defined it in bash file as
script=”sudo -u oracle -H bash”
ssh myhostname “${script}”
So after running this script it is prompting for fingerprint for authentication and just stuck at that point. If I do the same process manually without bash script I am able to validate that command successfully. I also tried to run other commands like creating a file with vim /tmp/SQL.txt and I’m able to validate that successfully but I am not able to run this sudo command. Any help is very much appreciated!!
kancharla chandra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.