|
From: lovecreatesbea... on 6 May 2008 11:33 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.
From: Stephane CHAZELAS on 6 May 2008 12:07 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? There's also ssh, rexec, http (CGI), or you can add your own in inetd.conf or run your own server. > What services should that remote host should run to provide the remsh > or rsh connection? Are rlogind and sshd in the list? For rsh, that would be the "shell" service. It is generally run via inetd. (which calls in.rshd upon an incoming rsh connection. > If I telnet(1) to the remote host from my local terminal and execute a > command, the command doesn't be executed remotely, right? Well, if it's executed on the remote machine, I guess we can say it is executed remotely. > And I can't get the output and return code of the command issued after > telnet, right? Why not? The problem with telnet is that it is meant to be used interactively by real users, so is always a pain to automate. "rsh/rexec/ssh" are its counterparts for scripting. > Why the "Net::Telnet" of perl can get back the output? Because there's nothing stopping it doing so. If you can see the command output when you run telent, why couldn't perl? -- St�phane
|
Pages: 1 Prev: Removing files but maintaining last 15 Next: ssh timeout script |