|
From: Bill Marcum on 6 May 2008 13:06 On 2008-05-06, lovecreatesbea...(a)gmail.com <lovecreatesbeauty(a)gmail.com> wrote: > > > If I telnet(1) to the remote host from my local terminal and execute a > command, the command doesn't be executed remotely, right? > It does, but if you telnet in a script, the remote commands come from standard input, so you have to use a pipe or use expect.
From: yagneshdodiya on 6 May 2008 14:47 On May 6, 8:33 pm, "lovecreatesbea...(a)gmail.com" <lovecreatesbea...(a)gmail.com> wrote: > Hi, > > If I want to execute a piece of command on a remote host, is remsh or > rsh the only choice, even I don't want to get back its output or > return code? > > What services should that remote host should run to provide the remsh > or rsh connection? Are rlogind and sshd in the list? > > If I telnet(1) to the remote host from my local terminal and execute a > command, the command doesn't be executed remotely, right? > > And I can't get the output and return code of the command issued after > telnet, right? Why the "Net::Telnet" of perl can get back the output? > > Thank you for your time. try using expect tool
From: Stephane CHAZELAS on 6 May 2008 15:51 2008-05-6, 08:33(-07), lovecreatesbea...(a)gmail.com: > If I want to execute a piece of command on a remote host, is remsh or > rsh the only choice, even I don't want to get back its output or > return code? [...] rsh -n some-host 'cmd < /dev/null > /dev/null 2>&1 &' Should start cmd on the remote host. The rsh session should only last the time necessary to start the command. -- St�phane
|
Pages: 1 Prev: Pros and Cons of using ftp vs. rsync? Next: Column mapping |