LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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
 
Thread Tools
Old 06-19-2009, 12:39 AM   #1
skipper_penguin
LQ Newbie
 
Registered: Jun 2009
Posts: 3
Thanked: 0
how can i enter unix commands in a putty session--> thru batch programming


[Log in to get rid of this advertisement]
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
skipper_penguin is offline     Reply With Quote
Old 06-19-2009, 04:25 AM   #2
colucix
Guru
 
Registered: Sep 2003
Location: Bologna, Italia
Distribution: OpenSUSE 11.1 CentOS 5.4 VectorLinux 6.0
Posts: 5,127
Thanked: 463
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
colucix is offline     Reply With Quote
Old 06-19-2009, 03:40 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Kubuntu Karmic Koala
Posts: 17,458
Blog Entries: 4
Thanked: 87
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
XavierP is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


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:05 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration