#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Plink/Putty telnet help


    I need to create a batch file for work that will allow the user to connect and send a single command to a device, no login required.

    I've decided to use plink/putty to implement this, as it seems to be the simplest way. However, I'm very new to telnet, and I can't figure out out to get plink to send the commands.

    for testing, I am simply trying to connect and send commands to gmail. I can do this in putty without any issue by connecting to smtp.gmail.com 25. I have saved this as a session named test1, and can then connect in the command prompt by typing "plink test1", and it connects, but I have no idea how to send any further commands. I cannot even type in the command prompt window at this point.

    Any suggestions?

    Thanks
  2. #2
  3. Automagically Delicious
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    127.0.0.2 - I live next door.
    Posts
    2,202
    Rep Power
    2737
    Plink is just the connection tool to get you to telnet or SSH to another machine using a CLI. Once you're connected you just need to send the commands over the telnet session then, aka, the command prompt.
    Adam TT
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0
    This is what I thought as well, but when I connect, I cannot type any further commands. The curser is there but typing has no effect, so I cannot input any commands.
  6. #4
  7. Automagically Delicious
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    127.0.0.2 - I live next door.
    Posts
    2,202
    Rep Power
    2737
    what is the command you are using to connect with plink? There may be some options in there to return to the command line. Otherwise, if you aren't going to be doing it via script, why don't you just use the pre-installed telnet?
    Adam TT
  8. #5
  9. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,436
    Rep Power
    4539
    Are you using telnet or ssh?

    I don't know about plink, but ssh client software on other systems allow you to send a remote command to the server when you connect, something like:

    ssh -p 22 someuser@somesite.zzz "put your remote command in quotes like this"
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo