Note that there are some explanatory texts on larger screens.

plurals
  1. POPuTTY scripting to log onto host
    primarykey
    data
    text
    <p>I'm using PuTTY to remotely log onto my school's host. Upon logging in, we are required to do these steps:</p> <ol> <li>enter username</li> <li>enter password</li> <li>command "add oracle"</li> <li>command "sqlplus"</li> <li>enter username</li> <li>enter password</li> </ol> <p>I will be logging into this host a lot over the course of this semester and I was hoping to create a script that would eliminate the redundancy of the above steps. Ignoring the obvious security oversights of having my password in the script, how would I achieve this? I have zero experience with scripting, so your feedback is greatly appreciated. Thanks!</p> <p>Edit: I played around with the command-line options for Putty and I was able to bypass steps 1-2 using:</p> <pre><code>putty -load "host" -l username -pw password </code></pre> <p>I've also created a shell file that looks like so:</p> <pre><code>#!/bin/bash add oracle10g sqlplus username password </code></pre> <p>When I try to add this option to the command-line using the -m option, it looks like PuTTY logs into the host and then immediately exits. Is there a way to keep my session open after running the shell file or am I using the -m option wrongly? Here is a link to a PuTTY guide that I have been following: <a href="http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter3.html" rel="noreferrer">http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter3.html</a>.</p> <p>Here is the total command that I am trying to run from the command-line:</p> <pre><code>putty -load "host" -l username -pw password -m c:\test.sh </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload