Ad Widget

Collapse

SSH Agent: can I switch user in Executed script SSH agent field?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cyberphantom
    Member
    • Dec 2021
    • 67

    #1

    SSH Agent: can I switch user in Executed script SSH agent field?

    Hello, I've searched for this question but I coudn't find anything.
    I have some hosts monitored by SNMP agent and I need to monitor a script output inside one of them, so I'm using SSH Agent to do it. The problem is, to execute this script, I have to switch for oracle user with su command. I'm already using a user (on the fields "user name" and "password") that has permissions to change to oracle user without asking for the password.
    I tried "su oracle && bash /home/oracle/scripts/script.sh;" and just "su oracle" but with these commands I receive a timeout... It's possible to do it?
    Last edited by cyberphantom; 22-05-2023, 19:37.
Working...