⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 577-579.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Special Edition Using Linux, Fourth Edition:Accessing the Network with telnet, ftp, and the r-Commands</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0789717468//-->

<!--TITLE=Special Edition Using Linux, Fourth Edition//-->

<!--AUTHOR=Jack Tackett//-->

<!--AUTHOR=Jr.//-->

<!--AUTHOR=Steve Burnett//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Que//-->

<!--CHAPTER=30//-->

<!--PAGES=577-579//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="../ch29/573-575.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="579-581.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 30<BR>Accessing the Network with <I>telnet, ftp,</I> and the <I>r-</I> Commands

</FONT></H2>

<P><I>by Steve Burnett</I></P>

<P><FONT SIZE="+1"><B>In this chapter</B></FONT></P>

<DL>

<DT>Using <TT>telnet</TT> to Access Remote Computers

<DT>Using FTP for Remote File Transfer

<DT>Using the <TT>r-</TT>  Commands

</DL>

<P>The major advantage you gain from computer networking is the capability to share resources and information and to access that information from remote locations. Linux provides a robust set of tools for doing just that. Whereas the World Wide Web lets you access lots of information in a hypertext format, additional tools allow you to log in to remote computers, transfer files, and execute remote commands.

</P>

<H3><A NAME="Heading2"></A><FONT COLOR="#000077">Using <I>telnet</I> to Access Remote Computers

</FONT></H3>

<P>The <TT>telnet</TT> command is the basic tool for remote login under Linux. <TT>telnet</TT> gives you a terminal session on the remote computer that allows you to execute commands as though you were logged in locally.</P>

<P>To log in to a computer via <TT>telnet</TT>, you must know a valid username and password on the remote machine. Although some systems do provide guest login capabilities, such capabilities are fairly rare due to security concerns. When guest logins are allowed, they almost always place users in a restricted shell or in a menu system. The idea behind these two guest environments is to provide computer security and protect the system from malicious or careless unknown users. A restricted shell prevents the user from executing specific commands; a menu system allows choices from a predefined set of menus only, blocking out shell access entirely.</P>

<P><TT>telnet</TT> also allows users to log in to their own computer from a remote location by entering their username and password. This way, users can check e-mail, edit files, and run programs on their normal computer as though they were logged in locally. However, you have to make do with a terminal-based environment instead of the X Windows system. <TT>telnet</TT> provides only terminal emulation for common terminals such as the DEC VT-100, which doesn&#146;t support graphical environments such as X Windows.</P>

<H4 ALIGN="LEFT"><A NAME="Heading3"></A><FONT COLOR="#000077"><I>telnet</I> Command Summary

</FONT></H4>

<P>The basic syntax for <TT>telnet</TT> is as follows:</P>

<!-- CODE SNIP //-->

<PRE>

telnet <I>[hostname]</I>

</PRE>

<!-- END CODE SNIP //-->

<P><TT>hostname</TT> is the name of a remote computer. If you don&#146;t specify a remote host, <TT>telnet</TT> starts in its interactive command mode. If you give a remote host name, <TT>telnet</TT> tries to initiate a session immediately.</P>

<P><TT>telnet</TT> accepts several command-line arguments, as listed in Table 30.1.</P>

<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 30.1</B> Command-Line Arguments for the <TT>telnet</TT> Command

<TR>

<TH COLSPAN="2"><HR>

<TR>

<TH WIDTH="25%" ALIGN="LEFT">Argument

<TH WIDTH="75%" ALIGN="LEFT">Description

<TR>

<TH COLSPAN="2"><HR>

<TR>

<TD><TT>-d</TT>

<TD>Turns on debugging.

<TR>

<TD><TT>-a</TT>

<TD>Attempts automatic login.

<TR>

<TD><TT>-n <I>tracefile</I></TT>

<TD>Turns on tracing and saves trace data in <TT><I>tracefile</I></TT>.

<TR>

<TD VALIGN="TOP"><TT>-e <I>escape_char</I></TT>

<TD>Sets the escape character for the session to be <I>escape_char</I>. If the <I>escape_char</I> character is omitted from the argument, there is no escape character for this <TT>telnet</TT> session.

<TR>

<TD VALIGN="TOP"><TT>-l <I>user</I></TT>

<TD>Sends the username <I>user</I> to the remote system for automatic login. This argument automatically includes the <TT>-a</TT> argument.

<TR>

<TD VALIGN="TOP">port

<TD>Indicates the port number to connect to on the remote system. This argument is used for specifying different network programs. If it&#146;s not specified, <TT>telnet</TT> connects to the default <TT>telnet</TT> port.

<TR>

<TD COLSPAN="2"><HR>

</TABLE>

<H4 ALIGN="LEFT"><A NAME="Heading4"></A><FONT COLOR="#000077">Sample <I>telnet</I> Session

</FONT></H4>

<P>It&#146;s time to take a walk through a sample <TT>telnet</TT> session. You start the <TT>telnet</TT> session by typing <TT>telnet</TT>, followed by the host name of the computer you want to connect to. <TT>telnet</TT> then returns with the message <TT>Trying <I>some IP address</I></TT> (where <I>some IP address</I> is the address of the computer you specified). If <TT>telnet</TT> successfully connects to the computer (that is, the computer is up and running and the network isn&#146;t down), Linux reports <TT>Connected to <I>computer name</I></TT> and then tells you that the escape character is some specific character sequence, almost always &lt;Ctrl-]&gt;. The escape character specifies the character sequence that you type to drop from your terminal session into the <TT>telnet</TT> command interpreter. You do this if you want to send commands directly to the <TT>telnet</TT> program and not to your remote computer session.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="../ch29/573-575.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="579-581.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -