Windows Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsWindows Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 21st, 2011, 08:50 AM
matthallo matthallo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 2 matthallo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 58 sec
Reputation 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

Reply With Quote
  #2  
Old February 21st, 2011, 09:21 AM
AdamPI's Avatar
AdamPI AdamPI is offline
Automagically Delicious
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: May 2004
Location: 127.0.0.2 - I live next door.
Posts: 2,199 AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 22 h 26 m 16 sec
Reputation Power: 2736
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

Reply With Quote
  #3  
Old February 21st, 2011, 10:37 AM
matthallo matthallo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 2 matthallo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 58 sec
Reputation 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.

Reply With Quote
  #4  
Old February 21st, 2011, 03:01 PM
AdamPI's Avatar
AdamPI AdamPI is offline
Automagically Delicious
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: May 2004
Location: 127.0.0.2 - I live next door.
Posts: 2,199 AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level)AdamPI User rank is General 26th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 22 h 26 m 16 sec
Reputation Power: 2736
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?

Reply With Quote
  #5  
Old February 21st, 2011, 08:31 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,257 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 18 h 51 m 19 sec
Reputation Power: 4445
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:

Quote:
ssh -p 22 someuser@somesite.zzz "put your remote command in quotes like this"
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsWindows Help > Plink/Putty telnet help

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap