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

    Join Date
    Aug 2017
    Posts
    2
    Rep Power
    0

    Putty/Plink help required


    Hello Everyone,

    I am using plink to connect to my router and run a few commands. It works well but when i try to go into configurate mode and execute command, instead of executing after going into configuration mode it waits for an input. How can i make it stop waiting for run the commands next in line.

    Thanks in advance
  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,280
    Rep Power
    9645
    Go for putty.exe instead.

    What is "configurate" mode? What command are you executing? What input is it waiting for?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2017
    Posts
    2
    Rep Power
    0
    1. Plink is a part of Putty. It is used for automating simple tasks.
    2. It was a type. It is "configuration" not "configurate".
    3. Router is Cisco ASR 9001
    i log in to my router using the following command :

    plink.exe username@routerip -C -pw password -m c:\commands.txt"

    I have the following commands in the commands file.

    show interfaces description - (executes correctly)
    configure terminal - (executes correctly)
    interface gi0/0/1 - (instead sending this command it keeps on waiting for an input while in configure mode. )
    shut
    commit


    I hope i explained the problem correctly.
  6. #4
  7. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    6,073
    Rep Power
    4101
    I'd guess that what happens is that from the ssh perspective the configure terminal command is still running and the following interface command would actually be input to the configure command.

    I'm not that familiar with Cisco (only messed with it very briefly many years ago) so I'm not sure that's what is happening but it sounds like it. It seems from some looking around on the web most people trying to do something like this use expect to read output/feed input into the ssh session rather than just listing commands.
    Last edited by kicken; August 2nd, 2017 at 01:05 PM.
    Recycle your old CD's



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

IMN logo majestic logo threadwatch logo seochat tools logo