I have created an .bat file with the following command with a text file which contain "sudo su - oradev2"(C.txt).
cd C:\Users\chakraborty_sayantan\Desktop plink -ssh serverA -l username -pw password -m "C:\Users\username\Desktop\c.txt" -t
The command above completes the first step of logging into a DB and the c.txt file has the instruction to enter into sudo mode. However, post this there is an authentication. Is there a way to automate the step of entering the password? Any thoughts? Procedure to automate
- login
- password
- sudo su - oradev
- password
- echo $ORACLE_SID
- sqlplus / as sysdba
- create user identified by
- default tablspace The above steps need to get automate using a bat file which consist of plink/putty.
-Sayantan