OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

There are a couple of different ways to execute commands or run programs on a remote machine and have the output, be it text or graphics, sent to your workstation. The connections can be secure or insecure. While it is of course advised to use secure connections instead of transporting your password over the network unencrypted, we will discuss some practical applications of the older (unsafe) mechanisms, as they are still useful in a modern networked environment, such as for troubleshooting or running exotic programs.


image

10.4.2. Rsh, rlogin and telnet


The rlogin and rsh commands for remote login and remote execution of commands are inherited from UNIX. While seldom used because they are blatantly insecure, they still come with almost every Linux distribution for backward compatibility with UNIX programs.


Telnet, on the other hand, is still commonly used, often by system and network administrators. Telnet is one of the most powerful tools for remote access to files and remote administration, allowing connections from anywhere on the Internet. Combined with an X server, remote graphical applications can be displayed locally. There is no difference between working on the local machine and using the remote machine.


Because the entire connection is unencrypted, allowing telnet connections involves taking high security risks. For normal remote execution of programs, Secure SHell or ssh is advised. We will discuss the secure method later in this section.


However, telnet is still used in many cases. Below are some examples in which a mail server and a web server are tested for replies:


Checking that a mail server works:


[jimmy@blob ~] telnet mailserver 25

Trying 192.168.42.1...

Connected to mailserver. Escape character is '^]'.

220 m1.some.net ESMTP Sendmail 8.11.6/8.11.6; 200302281626

ehlo some.net

250-m1.some.net Hello blob.some.net [10.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES

250-8BITMIME

250-SIZE

250-DSN

[jimmy@blob ~] telnet mailserver 25

Trying 192.168.42.1...

Connected to mailserver. Escape character is '^]'.

220 m1.some.net ESMTP Sendmail 8.11.6/8.11.6; 200302281626

ehlo some.net

250-m1.some.net Hello blob.some.net [10.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES

250-8BITMIME

250-SIZE

250-DSN


250-ONEX

250-ETRN

250-XUSR

250 HELP

mail from: [email protected]

250 2.1.0 [email protected]... Sender ok

rcpt to: [email protected]

250 2.1.5 [email protected]... Recipient ok

data

354 Enter mail, end with "." on a line by itself

test

.

250 2.0.0 g2MA1R619237 Message accepted for delivery

quit

221 2.0.0 m1.some.net closing connection Connection closed by foreign host.

250-ONEX

250-ETRN

250-XUSR

250 HELP

mail from: [email protected]

250 2.1.0 [email protected]... Sender ok

rcpt to: [email protected]

250 2.1.5 [email protected]... Recipient ok

data

354 Enter mail, end with "." on a line by itself

test

.

250 2.0.0 g2MA1R619237 Message accepted for delivery

quit

221 2.0.0 m1.some.net closing connection Connection closed by foreign host.

Checking that a web server answers to basic requests:


[jimmy@blob ~] telnet www.some.net 80

Trying 64.39.151.23...

Connected to www.some.net. Escape character is '^]'. HEAD / ;HTTP/1.1


HTTP/1.1 200 OK

Date: Fri, 22 Mar 2002 10:05:14 GMT

Server: Apache/1.3.22 (UNIX) (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6

DAV/1.0.2 PHP/4.0.6 mod_perl/1.24_01

Last-Modified: Fri, 04 Jan 2002 08:21:00 GMT ETag: "70061-68-3c3565ec"

Accept-Ranges: bytes Content-Length: 104 Connection: close Content-Type: text/html

Connection closed by foreign host. [jimmy@blob ~]

[jimmy@blob ~] telnet www.some.net 80

Trying 64.39.151.23...

Connected to www.some.net. Escape character is '^]'. HEAD / ;HTTP/1.1


HTTP/1.1 200 OK

Date: Fri, 22 Mar 2002 10:05:14 GMT

Server: Apache/1.3.22 (UNIX) (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6

DAV/1.0.2 PHP/4.0.6 mod_perl/1.24_01

Last-Modified: Fri, 04 Jan 2002 08:21:00 GMT ETag: "70061-68-3c3565ec"

Accept-Ranges: bytes Content-Length: 104 Connection: close Content-Type: text/html

Top OS Cloud Computing at OnWorks: