hadi motamedi wrote:
>
>
>Do you do a single iota of research on your own or do you
>expect the members of this list to do *everything* for you?
>
>
>
> Sorry for wrong question. I just need to know if you see implementing it
> via 'expect' or 'nc' is feasible or not?
Do you do a single iota of research on your own or do you
>expect the members of this list to do *everything* for you?
>
>
>
> Sorry for wrong question. I just need to know if you see implementing it
via 'expect' or 'nc' is feasible or not? I you see it feasible, I will
extract the d
On Mon, May 03, 2010 at 12:02:43PM +0100, hadi motamedi wrote:
> > Thank you . It can connect to remote node port 23. But how can I send
> command to remote node and capture its log?
Do you do a single iota of research on your own or do you
expect the members of this list to do *e
Maybe have a look at nc (man nc)...
>
> Thank you . It can connect to remote node port 23. But how can I send
command to remote node and capture its log?
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
From: hadi motamedi
>Actually I need to telnet to it and issue some commands and capture the output
>of the commands in a file and then wait for a prescribed time interval and
>then redo from the start (but I need to append all of the logs in just one
>file).
Maybe have a look at nc (man nc)..
On Sat, May 01, 2010 at 07:12:54AM -0400, Jim Perrin (jper...@gmail.com) wrote:
> On Sat, May 1, 2010 at 5:52 AM, hadi motamedi wrote:
[snip]
> Several things are wrong with this:
>
> 1. DO NOT EVER USE TELNET.
While I 100% agree with this you need to refine the wording a little
> 1. DO N
that cp command is executed on the remote system, so it will copy your
> log.cap file to /export/home on the remote system. is that what you
> want to do?
>
>
> No, actually I wanted to copy remote node /tmp/log.cap to its /export/home.
Please correct me.
Thank you
___
As others have already pointed out, this can be done with a simple
> bash script, even if you do use telnet. I'd suggest getting a good
> bash reference and learning it, or perl for a more robust interface.
>
> Thank you for your reply. From your first message regarding using expect to
do the job
On Sat, May 01, 2010 at 10:10:49AM +0100, hadi motamedi wrote:
Study up on 'vron' and 'crontab'.
jerry
> Dear All
> I need to schedule for a repeated task on my CentOS server, as the
> followings:
> -) Telnet to a remote node
> -) Issue a command
> -) Capture the output in a log
> -) Logou
On Sat, May 1, 2010 at 10:52 AM, Les Mikesell wrote:
> hadi motamedi wrote:
>> Dear All
>> I need to schedule for a repeated task on my CentOS server, as the
>> followings:
>> -) Telnet to a remote node
>> -) Issue a command
>> -) Capture the output in a log
>> -) Logout from Telnet
>> -) Wait for
hadi motamedi wrote:
>
>
> if you need to automate an interactive command you can use expect
> [1][2]
>
> Thank you for your reply. I am trying like the followings:
> #expect
> >set name 172.16.17.160
> >set user id
> >set password pwd
> >set cmd1 "cd /tmp"
> >set cmd2 "cp log.cap /export/h
On Sat, May 1, 2010 at 2:52 AM, hadi motamedi wrote:
>
>> if you need to automate an interactive command you can use expect [1][2]
>>
> Thank you for your reply. I am trying like the followings:
> #expect
>>set name 172.16.17.160
>>set user id
>>set password pwd
>>set cmd1 "cd /tmp"
>>set cmd2 "cp
>
> Several things are wrong with this:
>
> 1. DO NOT EVER USE TELNET.
> Seriously. Don't do this. It sends your user/pass in plain text. It's
> a horrendous security risk. I don't care what excuse you have to try
> to defend it. DO NOT DO IT. Use ssh keys instead.
>
I agree but some devices doesn
hadi motamedi wrote:
> Dear All
> I need to schedule for a repeated task on my CentOS server, as the
> followings:
> -) Telnet to a remote node
> -) Issue a command
> -) Capture the output in a log
> -) Logout from Telnet
> -) Wait for a prescribed time interval
> -) Then redo , but append the sub
> 1. DO NOT EVER USE TELNET.
>
> 2. Use ssh keys instead of setting a password in the script.
>
> 3. You don't need to use expect to set the PWD to /tmp. You can do
> this with basic scripting. Pick up a bash scripting guide and read
> through it. I see almost nothing in your example that requires
On Sat, May 1, 2010 at 5:52 AM, hadi motamedi wrote:
> Thank you for your reply. I am trying like the followings:
> #expect
>>set name 172.16.17.160
>>set user id
>>set password pwd
>>set cmd1 "cd /tmp"
>>set cmd2 "cp log.cap /export/home"
>>set cmd3 "logout"
>>spawn telnet $name
>>expect "log
if you need to automate an interactive command you can use expect [1][2]
>
> Thank you for your reply. I am trying like the followings:
#expect
>set name 172.16.17.160
>set user id
>set password pwd
>set cmd1 "cd /tmp"
>set cmd2 "cp log.cap /export/home"
>set cmd3 "logout"
>spawn telnet $name
>expe
On Sat, May 1, 2010 at 10:10 AM, hadi motamedi wrote:
> Dear All
> I need to schedule for a repeated task on my CentOS server, as the
> followings:
> -) Telnet to a remote node
> -) Issue a command
> -) Capture the output in a log
> -) Logout from Telnet
> -) Wait for a prescribed time interval
>
Dear All
I need to schedule for a repeated task on my CentOS server, as the
followings:
-) Telnet to a remote node
-) Issue a command
-) Capture the output in a log
-) Logout from Telnet
-) Wait for a prescribed time interval
-) Then redo , but append the subsequent output in just on file
Can you p
19 matches
Mail list logo