<?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/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>Sun, 10 May 2026 14:53:20 +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/14052.html</link>
		<comments>https://www.osyunwei.com/archives/14052.html#comments</comments>
		<pubDate>Wed, 25 Oct 2023 03:03:51 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=14052</guid>
		<description><![CDATA[1、配置别名登录 vi ~/.bashrc #编辑用户终端配置文件，在最后一行添加 alias to101='ssh -p 22 root@192.168.21.101' alias to102='ssh -p 22 root@192.168.21.102' :wq! #保存退出 source ~/.bashrc #使配置立即生效 to101 #远程连接192.168.21.101 to102 #远程连接192.168.21.102 2、配置免密登录 配置从192.168.21.103免密码登录到192.168.21.101和192.168.21.102 在192.168.21.103操作 ssh-keygen #输入命令，按三次回车，会生成私钥和公钥 cd /root/.ssh #进入目录，会看到生成的私钥和公钥 #拷贝公钥 ssh-copy-id root@192.168.21.101 #输入192.168.21.101的root密码 ssh-copy-id root@192.168.21.102 #输入192.168.21.102的root密码 在101和102的/root/.ssh目录下会有authorized_keys这个公钥文件 再次从103输入别名可以免密登录101和102服务器 备注：vi ~/.bash_profile  这个文件也可以添加别名。 至此，Linux配置SSH远程免密码和别名登录完成。 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/14052.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » Linux配置SSH远程免密码和别名登录<p><a rel="bookmark" href="https://www.osyunwei.com/archives/14052.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/14052.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下使用Google Authenticator配置SSH登录动态验证码</title>
		<link>https://www.osyunwei.com/archives/9045.html</link>
		<comments>https://www.osyunwei.com/archives/9045.html#comments</comments>
		<pubDate>Mon, 15 Jun 2015 01:39:43 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[安全优化]]></category>
		<category><![CDATA[Authenticator]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[动态验证码]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9045</guid>
		<description><![CDATA[说明： 1、一般ssh登录服务器，只需要输入账号和密码。 2、本教程的目的：在账号和密码之间再增加一个      验证码，只有输入正确的验证码之后，再输入      密码才能登录。这样就增强了ssh登录的安全性。 3、账号、验证码、密码三者缺一个都不能登录，即使账号和密码正确，验证码错误，同样登录失败。 4、验证码：是动态验证码，并且是通过手机客户端自动获取（默认每隔30秒失效一次）。 5、最终目的：远程ssh登录一台服务器，需要正确的账号、密码、及一个可以获取到动态验证码的手机     （目前支持Android和ios手机系统）。 具体操作： 操作系统：CentOS 一、关闭SELINUX vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存退出 setenforce 0 #使配置立即生效 二、安装编辑工具包 1、使用CentOS默认yum源安装 yum install wget gcc make yum install pam-devel libpng-devel 2、配置repoforge第三方yum源安装mercurial包 CentOS各个版本，请选择正确版本 CentOS 5.x rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm CentOS 6.x rpm [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9045.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9045.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
		<item>
		<title>Linux下SSH远程连接断开后让程序继续运行解决办法</title>
		<link>https://www.osyunwei.com/archives/4218.html</link>
		<comments>https://www.osyunwei.com/archives/4218.html#comments</comments>
		<pubDate>Sat, 09 Jun 2012 17:18:13 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[远程连接]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=4218</guid>
		<description><![CDATA[碰到问题： 通过SSH远程登录到Linux系统，要在/home目录下面下载一个mysql-5.5.25.tar.gz的安装包 在下载的过程中，不小心把SSH远程连接关闭了，这个时候下载也会中断 必须重新登录到系统，再次手动执行命令，才能继续下载之前未下载完成的文件。 有没有办法在SSH远程连接被断开或者关闭的时候，系统里面的下载程序还能继续运行？ 再次登录到系统之后，还能够看都上次正在下载的文件？ 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 答案：有办法 解决办法：（以CentOS系统为例） 1、安装screen命令 yum  install screen   #安装 2、screen -S  mysql5.5   #创建screen会话，自定义screen虚拟终端的名称，mysql5.5可以改为你想要的名称 3、进入/home目录，使用wget命令下载mysql-5.5.25.tar.gz cd  /home wget http://mysql.mirror.kangaroot.net/Downloads/MySQL-5.5/mysql-5.5.25.tar.gz   #下载（需要先安装wget下下载命令） 如下图所示系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 4、测试 关闭SSH远程连接窗口，然后重新登录 screen -r mysql5.5 #查看之前的下载会话虚拟终端 可以看到下载还在继续进行，目的达到！ 扩展阅读： screen -ls  #查看所有screen会话 按键盘上面的Ctrl+a，然后再按d     #保存当前的screen会话 exit   #退出screen screen -wipe  mysql5.5   #删除会话 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/4218.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » Linux下SSH远程连接断开后让程序继续运行解决办法<p><a rel="bookmark" href="https://www.osyunwei.com/archives/4218.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/4218.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FreeBSD配置防火墙开启SSH服务</title>
		<link>https://www.osyunwei.com/archives/3007.html</link>
		<comments>https://www.osyunwei.com/archives/3007.html#comments</comments>
		<pubDate>Sun, 04 Mar 2012 17:12:39 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[FreeBSD防火墙]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=3007</guid>
		<description><![CDATA[1、配置FreeBSD 防火墙 ee /etc/rc.conf   #编辑，在最后添加 firewall_enable="yes"  #开启防火墙 net.inet.ip.fw.verbose=1   #启用防火墙日志功能 net.inet.ip.fw.verbose_limit=5  #启用防火墙日志功能 natd_enable="YES"  # 开启防火墙NAT功能 natd_interface="rl0"      natd_flags="-dynamic -m" firewall_script="/etc/ipfw.rules"      #自定义防火墙规则路径 按esc，回车，再按a保存配置 2、添加防火墙规则 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容版权所有,转载请注明出处及原文链接 ee /etc/ipfw.rules    #编辑防火墙规则，添加以下代码 备注：参数说明： #$cmd 300 deny all from 192.168.0.0/16  to any in via $pif  #RFC 1918 private IP 我的IP地址是192.168.21.173，是属于192.168.0.0/16 IP段，所以这里要注释掉这一行，允许连接外网，否则主机无法联网。 $cmd 380 allow tcp from any to me 22 in [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/3007.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/3007.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SUSE Linux Enterprise Server 设置防火墙开启ssh远程端口</title>
		<link>https://www.osyunwei.com/archives/2931.html</link>
		<comments>https://www.osyunwei.com/archives/2931.html#comments</comments>
		<pubDate>Sat, 03 Mar 2012 12:08:59 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[SUSE Linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[防火墙]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=2931</guid>
		<description><![CDATA[1、vi /etc/sysconfig/SuSEfirewall2   #编辑防火墙设置 FW_SERVICES_EXT_TCP="22"   #开启22端口 rcSuSEfirewall2 restart   #重启防火墙 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容版权所有,转载请注明出处及原文链接 2、安装ssh zypper serach ssh  #查找软件包 zypper install openssh  #安装，或者使用yast2 -i openssh 命令 chkconfig sshd on  #设置开机启动 ############################################### 扩展阅读： 修改主机名字 vi /etc/HOSTNAME  #编辑文件 hostname -F /etc/HOSTNAME   #使修改立刻生效 禁止图形界面登录 vi /etc/inittab id:3:initdefault:   #3为文本模式，5为图形界面模式 ############################################### &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/2931.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » SUSE Linux Enterprise Server 设置防火墙开启ssh远程端口<p><a rel="bookmark" href="https://www.osyunwei.com/archives/2931.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/2931.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu配置apt-get源安装SSH服务</title>
		<link>https://www.osyunwei.com/archives/2514.html</link>
		<comments>https://www.osyunwei.com/archives/2514.html#comments</comments>
		<pubDate>Sat, 18 Feb 2012 07:01:53 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu配置apt-get]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=2514</guid>
		<description><![CDATA[说明： Ubuntu默认安装下没有配置国内apt-get源、这样使用apt-get在线安装软件会很慢，下面教大家配置apt-get国内镜像源，在线安装SSH服务（最小话安装的Ubuntu默认没有安装SSH） 1、配置apt-get源 cp  /etc/apt/sources.list  /etc/apt/sources.listbak   #备份原有配置文件 nano  /etc/apt/sources.list   #编辑，添加以下代码： 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接        deb http://mirrors.163.com/ubuntu/ oneiric main restricted universe multiverse        deb http://mirrors.163.com/ubuntu/ oneiric-security main restricted universe multiverse        deb http://mirrors.163.com/ubuntu/ oneiric-updates main restricted universe multiverse        deb http://mirrors.163.com/ubuntu/ oneiric-proposed main restricted universe multiverse        deb http://mirrors.163.com/ubuntu/ oneiric-backports main restricted universe multiverse        deb-src [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/2514.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/2514.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian 配置apt-get源安装SSH服务</title>
		<link>https://www.osyunwei.com/archives/2215.html</link>
		<comments>https://www.osyunwei.com/archives/2215.html#comments</comments>
		<pubDate>Sun, 12 Feb 2012 09:53:05 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=2215</guid>
		<description><![CDATA[说明：在没有接入网络的情况下，采用最小话方式安装debian，默认是没有配置apt-get源、没有安装远程管理服务SSH的，这个时候是无法使用apt-get install 在线安装软件的，也无法使用putty等远程管理客户端连接服务器，下面教大家配置apt-get源，在线安装SSH服务： 1、配置apt-get源 cp  /etc/apt/sources.list  /etc/apt/sources.listbak   #备份原有配置文件        nano  /etc/apt/sources.list   #编辑 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接       注释掉本地光盘源这一行： deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official i386 DVD Binary-1 20120128-12:53]/ squeeze contrib main       取消下面两行官方源前面的注释，添加以下代码： ctrl+o   #保存配置        ctrl+x   #退出        apt-get update   #更新源        apt-get upgrade  #更新系统 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 2、安装SSH服务  apt-get install ssh     #安装ssh服务 至此，Debian配置apt-get源安装SSH服务教程完成，现在可以使用apt-get install安装软件、使用putty远程连接服务器了。 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/2215.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/2215.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 6.0修改ssh远程连接端口</title>
		<link>https://www.osyunwei.com/archives/672.html</link>
		<comments>https://www.osyunwei.com/archives/672.html#comments</comments>
		<pubDate>Wed, 02 Nov 2011 13:42:40 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[修改ssh端口]]></category>

		<guid isPermaLink="false">http://w66416.s75.chinaccnet.cn/?p=672</guid>
		<description><![CDATA[实现目的：把ssh默认远程连接端口修改为2222 方法如下： 1、编辑防火墙配置：vi /etc/sysconfig/iptables 防火墙增加新端口2222 -A INPUT -m state --state NEW -m tcp -p tcp --dport 2222 -j ACCEPT ====================================================================== # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/672.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/672.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
