<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post/802/</link>
<title><![CDATA[[实践OK]CentOS7默认不让Root登录/FreeBSD装好后，如何让root用户能直接进行ssh登录以及配置密钥方法，freeBSD 让root ssh登陆, vi /etc/ssh/sshd_config，PermitRootLogin yes。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Tue, 11 Dec 2007 01:37:09 +0000</pubDate> 
<guid>http://www.jackxiang.com/post/802/</guid> 
<description>
<![CDATA[ 
	centos 7 禁止root直接登录系统，FreeBSD出于安全原因，默认参数很严格，禁止root用户直接使用ssh登陆 <br/>比如先用非root的帐户，登陆到ssh后，su成为root <br/>如果想直接用root登陆，则修改如下配置文件： <br/>vi /etc/ssh/sshd_config&nbsp;&nbsp;#是sshd_config得有个d,不是这个：/etc/ssh/ssh_config，是这个/etc/ssh/sshd_config<br/><br/>找到其中的如下一行，将前边的#符号去掉，并修改no为yes <br/>#PermitRootLogin no <br/>改成： <br/>PermitRootLogin yes <br/><br/>接下来执行如下命令重新启动SSH服务： <br/>xxx# /etc/rc.d/sshd restart <br/>Stopping sshd. <br/>Waiting for PIDS: 349. <br/>Starting sshd. <br/>xxx# <br/><br/>重新启动完成后，ssh即可登陆。<br/><br/>有可能要重新启动一下，reboot，我有次就重新启动可以ssh进去。AddTime：2016-01-10<br/>service sshd restart<br/>ps -ef&#124;grep sshd<br/>root&nbsp;&nbsp;&nbsp;&nbsp; 49624&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;0 17:14 ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00:00:00 /usr/sbin/sshd<br/>____________________________________________________________________________<br/><br/>开启SSH服务<br/>（1）ee&nbsp;&nbsp;/etc/inetd.conf&nbsp;&nbsp;#编辑，去掉sshd前面的#<br/>ssh&nbsp;&nbsp;&nbsp;&nbsp; stream&nbsp;&nbsp;tcp&nbsp;&nbsp;&nbsp;&nbsp; nowait&nbsp;&nbsp;root&nbsp;&nbsp;&nbsp;&nbsp;/usr/sbin/sshd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sshd -i -4<br/>（2）ee&nbsp;&nbsp;/etc/rc.conf&nbsp;&nbsp; #编辑，在最后添加<br/>sshd_enable=&quot;yes&quot;&nbsp;&nbsp; <br/>（3）ee&nbsp;&nbsp;/etc/ssh/sshd_config&nbsp;&nbsp;#编辑配置文件<br/>PermitRootLogin yes&nbsp;&nbsp; #允许root登录<br/>PasswordAuthentication yes&nbsp;&nbsp;&nbsp;&nbsp;#使用密码验证<br/>PermitEmptyPasswords no&nbsp;&nbsp; #不允许空密码登录<br/>/etc/rc.d/sshd start&nbsp;&nbsp;#启动ssh服务<br/>/etc/rc.d/sshd restart&nbsp;&nbsp;&nbsp;&nbsp;#重启ssh<br/><br/>http://www.osyunwei.com/archives/3007.html<br/><br/>____________________________________________________________________________<br/>1 在FreeBSD中执行<br/>ssh-keygen -t dsa<br/><br/>可得到<br/>/home/leakon/.ssh/id_dsa<br/>/home/leakon/.ssh/id_dsa.pub<br/><br/>2 可以用 WinSCP 下载这个两个文件到本地，保存到<br/>C:&#92;Documents and Settings&#92;leakon&#92;Application Data&#92;VanDyke&#92;<br/><br/>这是 SecureCRT 在 Windows 的 leakon 用户的程序数据文件夹中生成的目录<br/>我保存到：D:&#92;ssh_tmp&#92;freeBSD_Key_Login<br/><br/>3 打开会话选项，在 分类 中选择 SSH2，在右边的 身份验证 中选择 公钥（PublicKey），然后点击旁边的 属性（Properites），选择 使用会话公钥设置（注意：会话公钥）（Use session public key setting），在 使用身份文件（Use identify file） 的输入框中，选择刚才下载回来的 id_dsa，注意，id_dsa 和 id_dsa.pub 要保存在一起（两个文件取名任意，但必须符合 somekey 和 somekey.pub）<br/><br/>4 按照 /etc/ssh/sshd_config 中指定的公钥文件名 AuthorizedKeysFile .ssh/authorized_keys，修改本地公钥文件名，在FreeBSD中执行<br/>cd /home/leakon/.ssh/<br/>mv id_dsa.pub authorized_keys&nbsp;&nbsp;另外一个id_dsa可以不动它。<br/><br/>至此，方法一大功告成，重新用 SecureCRT 连接一下试试，直接就登录好了吧
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post/802/#blogcomment53420</link>
<title><![CDATA[[评论] [实践OK]CentOS7默认不让Root登录/FreeBSD装好后，如何让root用户能直接进行ssh登录以及配置密钥方法，freeBSD 让root ssh登陆, vi /etc/ssh/sshd_config，PermitRootLogin yes。]]></title> 
<author>moldova &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 21 Sep 2010 08:23:40 +0000</pubDate> 
<guid>http://www.jackxiang.com/post/802/#blogcomment53420</guid> 
<description>
<![CDATA[ 
	我还使用过一款很好的登录密钥-Rohos登录密钥<br/>http://blog.sina.com.cn/s/blog_6a4010f50100k11g.html<br/><br/>有详细说明<br/>
]]>
</description>
</item>
</channel>
</rss>