<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>系统运维 &#187; SSH密钥登录</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/ssh%E5%AF%86%E9%92%A5%E7%99%BB%E5%BD%95/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Tue, 14 Apr 2026 10:59:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>配置Linux服务器SSH远程密钥登录</title>
		<link>https://www.osyunwei.com/archives/5620.html</link>
		<comments>https://www.osyunwei.com/archives/5620.html#comments</comments>
		<pubDate>Fri, 14 Dec 2012 16:49:26 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[SSH密钥登录]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=5620</guid>
		<description><![CDATA[说明： 服务器IP：192.168.21.131 管理员账号：root 密码：123456 普通登录账号：osyunwei.com 密码：123456 实现目的： 1、配置普通账号通过密钥验证远程SSH登录服务器 2、禁用root账号通过远程SSH登录服务器 3、禁用所有账号通过密码验证远程SSH登录服务器 具体操作： 1、配置普通账号通过密钥验证远程SSH登录服务器 使用普通账号osyunwei.com登录服务器操作 ssh-keygen -t rsa #生成密钥 cd /home/osyunwei.com/.ssh  #进入目录 mv id_rsa.pub authorized_keys  #生成验证文件 下载服务器/home/osyunwei.com/.ssh/id_rsa文件到本地（可以使用winscp等工具下载） 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 打开puttygen.exe 下载地址：http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe 选择Conversions-Import key打开上一步下载到本地的文件id_rsa 点Save private key，根据提示选择“是”，最后保存为id_rsa.ppk 2、禁止root通过SSH远程登录服务器、禁用所有账号通过密码验证远程SSH登录服务器 vi /etc/ssh/sshd_config #编辑 PermitRootLogin no #把前面的注释#取消，yes修改为no，这样root就不能远程登录了！ PasswordAuthentication no #把前面的注释#取消，yes修改为no，这样就禁用所有账号通过密码验证登录 :wq! #保存退出 /etc/init.d/sshd restart #重启SSH服务 3、打开putty.exe 使用root账户登录，出现下面提示，无法直接登录 putty下载地址：http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe 使用普通账户osyunwei.com登录，出现下面提示，无法直接登录 4、实现普通账户osyunwei.com通过密钥验证远程SSH登录服务器 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/5620.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/5620.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
