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

📄 1653.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 3 页
字号:
“RSAAuthentication”设置是否允许只有RSA安全验证。 <br>
<br>
PasswordAuthentication yes <br>
“PasswordAuthentication”设置是否允许口令验证。 <br>
<br>
PermitEmptyPasswords no <br>
“PermitEmptyPasswords”设置是否允许用口令为空的帐号登录。 <br>
<br>
AllowUsers admin <br>
“AllowUsers”的后面可以跟着任意的数量的用户名的匹配串(patterns)或user@host这样的匹配串,这些字符串用空格隔开。主机名可以是DNS名或IP地址。 <br>
<br>
配置OpenSSH使其使用TCP-Wrappers inetd超级服务器 <br>
TCP-WRAPPERS用来启动和停止sshd1服务。当inetd运行的时候,它会从配置文件(默认为“/etc/inetd.conf”)中读入配置信息。在配置文件中每一行的不同项是用TAB或空格分开。 <br>
<br>
第一步 <br>
<br>
编辑“inetd.conf”文件(vi /etc/inetd.conf)并加入这一行: <br>
<br>
ssh stream tcp nowait root /usr/sbin/tcpd sshd –i <br>
<br>
注意:“-i”参数很重要,它说明sshd是被inetd运行的。在加入这一行后,通过发送一个SIGHUP信号(killall –HUP inetd)来更新“inetd.conf”文件。 <br>
<br>
[root@deep /root]# killall -HUP inetd <br>
<br>
第二步 <br>
<br>
编辑“hosts.allow”文件(vi /etc/hosts.allow)并加入这一行: <br>
<br>
sshd: 192.168.1.4 win.openarch.com <br>
<br>
这一行表示IP地址为“192.168.1.4”,主机名为“win.openarch.com”的计算机允许用ssh访问服务器。 <br>
<br>
下面这些“daemon”字符串(用于TCP-WRAPPERS)被sshd1使用: <br>
<br>
sshdfwd-X11 (允许/禁止X11转发). <br>
sshdfwd- (TCP转发). <br>
sshdfwd- (port-name在/etc/services中定义。用于TCP转发). <br>
<br>
注意:如果准备使用ssh,一定要用在所有的服务器上。如果十台安全的服务器和一台不安全的服务器配在一起,也谈不上什么安全性。 <br>
<br>
更多的资料 <br>
如果想查找详细的资料可以用man命令查帮助页,读取相关信息: <br>
<br>
$ man ssh (1) - OpenSSH secure shell client (remote login program) <br>
$ man ssh [slogin] (1) - OpenSSH secure shell client (remote login program) <br>
$ man ssh-add (1) - adds identities for the authentication agent <br>
$ man ssh-agent (1) - authentication agent <br>
$ man ssh-keygen (1) - authentication key generation <br>
$ man sshd (8) - secure shell daemon <br>
<br>
SSH1每用户配置 <br>
第一步 <br>
<br>
为本地服务器创建私有和公用密匙,执行下面的命令: <br>
<br>
[root@deep]# su username <br>
[username@deep]$ ssh-keygen1 <br>
<br>
举个例子,显示出来的结果可能是: <br>
<br>
Initializing random number generator... <br>
Generating p: ............................++ (distance 430) <br>
Generating q: ......................++ (distance 456) <br>
Computing the keys... <br>
Testing the keys... <br>
Key generation complete. <br>
Enter file in which to save the key (/home/username/.ssh/identity): 【按下回车键】 <br>
Enter passphrase: <br>
Enter the same passphrase again: <br>
Your identification has been saved in /home/username/.ssh/identity. <br>
Your public key is: <br>
1024 37 <br>
14937757511251955533691120318477293862290049394715136511145806108870001764378494676831 <br>
29757784315853227236120610062314604405364871843677484233240919418480988907860997175244 <br>
46977589647127757030728779973708569993017043141563536333068888944038178461608592483844 <br>
590202154102756903055846534063365635584899765402181 username@deep.openarch.com <br>
Your public key has been saved in /home/username/.ssh/identity.pub <br>
<br>
注意:如果有多个帐号需要为每个帐号创建一个密匙。 <br>
<br>
你可能要为下面的服务器创建密匙: <br>
<br>
l Mail服务器 <br>
<br>
l Web服务器 <br>
<br>
l 网关服务器 <br>
<br>
这允许对这些服务器进行有限的访问,例如,不允许用Mail服务器的帐号访问Web服务器或网关服务器。这样可以增加整体的安全性,即使因为某种原因有一个密匙被泄密了,也不会影响到其它的服务器。 <br>
<br>
第二步 <br>
<br>
把本机的公用密匙(identity.pub)拷贝到远程主机的“/home/username/.ssh”目录下,例如,使用“authorized_keys”这个名字。 <br>
<br>
注意:拷贝文件的一个方法使用ftp命令,另一个办法是把公用密匙用email(包含“~/.ssh/identity.pub”文件的内容)发给系统管理员。 <br>
<br>
改变pass-phrase <br>
<br>
用加上“-p”参数的“ssh-keygen”命令,在任何时候都可以改变pass-phrase。用下面的命令,改变pass-phrase: <br>
<br>
[root@deep]# su username <br>
[username@deep]$ ssh-keygen1 –p <br>
<br>
Enter file key is in (/home/username/.ssh/identity): [按下回车键] <br>
Enter old passphrase: <br>
Key has comment username@deep.openarch.com <br>
Enter new passphrase: <br>
Enter the same passphrase again: <br>
Your identification has been saved with the new passphrase. <br>
<br>
OpenSSH用户工具 <br>
下面列出的是一些我们经常要用到的命令,当然还有很多其它的命令,更详细的信息可以查看man帮助页或其它文档。 <br>
<br>
ssh <br>
ssh(Secure Shell)是用来登录远程计算机和在远程计算机上执行命令的程序。它是用来替代rlogin和rsh,以及在不安全的网络环境下在两台计算机之间提供安全和加密的信息交流。X11连接和TCP/IP端口可以被转发到一个安全的通道里。 <br>
<br>
用下面的命令,登录远程计算机: <br>
<br>
[root@deep]# ssh <br>
<br>
例如: <br>
<br>
[root@deep]# ssh username www.openarch.com <br>
username@deep.openarch.com’s password: <br>
Last login: Tue Oct 19 1999 18:13:00 -0400 from gate.openarch.com <br>
Welcome to www.openarch.com on Deepforest. <br>
<br>
是用来登录ssh服务器的用户名,是ssh服务器主机的地址。 <br>
<br>
scp <br>
可以用这个命令把文件从本地计算机拷贝到远程计算机,或者反之,甚至可以在两台远程计算机之间用“scp”命令拷贝文件。把远程主机上的文件拷贝到当前目录的一个简单的方法如下。 <br>
<br>
用下面的命令把文件从远程主机拷贝到本地主机上: <br>
<br>
[root@deep /]# su admin <br>
[admin@deep /]$ scp -p :/dir/for/file localdir/to/filelocation <br>
<br>
例如: <br>
<br>
[username@deep]$ scp -p username@mail:/etc/test1 /tmp <br>
Enter passphrase for RSA key username@mail.openarch.com: <br>
test1 | 2 KB | 2.0 kB/s | ETA: 00:00:00 | 100% <br>
<br>
用下面的命令把文件从本地主机拷贝到远程主机上: <br>
<br>
[root@deep /]# su admin <br>
[admin@deep /]$ scp -p localdir/to/filelocation :/dir/for/file <br>
<br>
例如: <br>
<br>
[username@deep]$ scp -p /usr/bin/test2 username@mail:/var/tmp <br>
username@mails password: <br>
test2 | 7 KB | 7.9 kB/s | ETA: 00:00:00 | 100% <br>
<br>
注意:“-p”选项表示文件的改变和访问时间属性以及权限,在拷贝过程中被保留。通常是需要这样的。 <br>
<br>
安装到系统中的文件 <br>
&gt; /etc/ssh <br>
&gt; /etc/ssh/ssh_config <br>
&gt; /etc/ssh/sshd_config <br>
&gt; /etc/ssh_host_key <br>
&gt; /etc/ssh_host_key.pub <br>
&gt; /usr/bin/ssh <br>
&gt; /usr/bin/slogin <br>
&gt; /usr/man/man1/ssh.1 <br>
&gt; /usr/man/man1/scp.1 <br>
&gt; /usr/man/man1/ssh-add.1 <br>
&gt; /usr/man/man1/ssh-agent.1 <br>
&gt; /usr/man/man1/ssh-keygen.1 <br>
&gt; /usr/bin/scp <br>
&gt; /usr/bin/ssh-add <br>
&gt; /usr/bin/ssh-agent <br>
&gt; /usr/bin/ssh-keygen <br>
&gt; /usr/man/man1/slogin.1 <br>
&gt; /usr/man/man8/sshd.8 <br>
&gt; /usr/sbin/sshd <br>
<br>
Windows平台上免费的SSH客户软件 <br>
Putty <br>
Putty的主页:http://www.chiark.greenend.org.uk/~sgtatham/putty.html <br>
<br>
Tera Term Pro and TTSSH <br>
Tera Term Pro的主页:http://hp.vector.co.jp/authors/VA002416/teraterm.html <br>
<br>
TTSSH Homepage:http://www.zip.com.au/~roca/download.html <br>
<br>
版权说明 <br>
这篇文章翻译和改编自Gerhard Mourani的《Securing and Optimizing linux: RedHat Edition》,原文及其版权协议请参考:www.openna.com。 <br>
<br>
中文版的版权属于作者brimmer和www.linuxaid.com.cn。 <br>
(http://www.fanqiang.com)     进入【UNIX论坛】<br>
相关文章<br>
<br>
===更多相关===<br>
 <br>
<br>
★  樊强制作 欢迎分享  ★<br>
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

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