LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 06-19-2009, 12:39 AM   #1
skipper_penguin
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
how can i enter unix commands in a putty session--> thru batch programming


Hi all!!, i´m new at the forum..
I´m doing some batch scripting... I´ve already opened a putty session and then connected to a particular server.. the problem is that i don´t know how to enter a unix command...

so far I wrote
call c:\putty.exe -ssh user@server.com -pw password

now a putty session is opened... how should be the line to enter a simply "ls" in the putty session?

thanks!
Skipper
 
Old 06-19-2009, 04:25 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: OpenSUSE 12.1 CentOS 6.2
Posts: 8,435

Rep: Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154
The command line tool is plink.exe, not putty.exe. You can write your commands in a file, e.g. "commands.txt" and do something like:
Code:
plink.exe 192.168.0.1 -ssh -batch -l username -pw password -m commands.txt
 
Old 06-19-2009, 03:40 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,045
Blog Entries: 4

Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
putty ssh batch zerocool22 Linux - Networking 8 06-19-2009 10:47 AM
Help Needed with putty session damoh Linux - Newbie 11 05-10-2009 11:39 AM
Putty disconnects session. groxy Linux - Software 1 03-20-2009 06:33 AM
putty saved session melvinong Linux - Server 4 11-14-2007 06:33 AM
Creating Batch Commands? reefadt Linux - Newbie 3 08-17-2003 10:46 AM


All times are GMT -5. The time now is 05:44 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration