Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SSH SUDO passwordless to run commands on remote server

Nandakumar Thukkaram-OracleApr 27 2015 — edited May 1 2015

Hi Experts,

We are running various OS/Network and Database related commands and scripts on Local and Remote Server to perform/compare the results

As part of this activity, we have bottleneck on running commands/scripts on the remote server as we need to provide password everytime whenever we use SSH command

Also, we need to run command as ssh sudo su - oracle for security purpose which prompts password two times.

we would like to automate this process in order to save password securely(temporarily) while running ssh sudo commands/scripts.

I see, there are various solutions using SSHPASS,EXPECT commands, however we dont have anything available to use within our group.

We may not be able to use SSHPASS as this component not installed during VM build, so we left with only option to use EXPECT.

So, Need your help to get any example working script using EXPECT for ssh sudo passwordless connection.

Appreciate if anybody can share ideas or working scripts

Thanks in advance

This post has been answered by Dude! on Apr 28 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 29 2015
Added on Apr 27 2015
42 comments
10,933 views