打通Fedora19的ssh服务
Fedora19的SSH服务是默认关闭的,安装后我们需要打通它。
首先,编辑/etc/ssh/sshd_config,把下面黑体字部分打开注释,如下:
# $OpenBSD: sshd_config,v 1.89 2013/02/06 00:20:42 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 22
AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# The default requires explicit activation of protocol 1
#Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#RSAAuthentication yes
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
PermitEmptyPasswords no
PasswordAuthentication yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes
# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
# WARNING: 'UsePAM no' is not supported in Fedora and may cause several
# problems.
#UsePAM no
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
# Uncomment this if you want to use .local domain
#Host *.local
# CheckHostIP no
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
然后,保存退出。再使用命令
#service sshd start打开服务。
在使用以下命令让SSHD开机启动。
# chkconfig sshd --level 35 on
Note: Forwarding request to 'systemctl enable sshd.service'.
以后Linux服务器开机后,就可以用PUTY,SecureCRT等直接连通了。
打通Fedora19的ssh服务的更多相关文章
- 打通Fedora19的vsftpd服务
Fedora19默认vsftpd也没安,安装界面里也没地方让我选,这一点不如以前的版本人性化.没办法只有自己来了,倒也不费事. 1.下载vsftpd rpm安装包 我是从http://rpmfind. ...
- Docker-为镜像添加SSH服务
进入容器的办法有很多,包括exec.attach等命令,但是这些命令都无法解决远程管理容器的问题,因此,需要SSH的支持 基于commit命令创建 docker提供了docker commit命令,支 ...
- 2016-11-05实战-定义ssh服务的日志
1.编辑/etc/rsyslog.conf 输入 local 0 .* /var/log/sshd.log #日志的保存路径 2.定义ssh服务的日志级别 编辑sshd服务的主配置文件:/ ...
- Ubuntu ssh服务安装
在使用xshell连接ubuntu虚拟机时,提示 Could not connect to '192.168.0.106' (port 22): Connection failed. 在主机使用pin ...
- ubuntu开启SSH服务
SSH分客户端openssh-client和openssh-server 如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-g ...
- Linux mint 18版本开启SSH服务
linux mint 18版本默认是没有安装ssh server的 需要手动安装 安装ssh server: 此命令需要联网,会自动下载安装 安装之后看是否开始了ssh, 看到ssh-agent 和s ...
- 如何开启ubuntu的SSH服务
buntu默认并没有安装ssh服务,如果通过ssh链接ubuntu,需要自己手动安装ssh-server,然而SSH分客户端openssh-client和服务端openssh-server,opens ...
- 创建支持ssh服务的docker容器和镜像
http://www.kongxx.info/blog/?p=57 1. 这里使用的centos作为容器,所以首先下载centos的imagessudo docker pull centos 2. 下 ...
- kali ssh服务开启登录
vi /etc/ssh/sshd_config 将#PasswordAuthentication no的注释去掉,并且将NO修改为YES //kali中默认是yes 2. 将PermitRootLog ...
随机推荐
- kali下利用weeman进行网页钓鱼
工具下载链接:https://files.cnblogs.com/files/wh4am1/weeman-master.zip 利用wget命令下载zip压缩包 利用unzip命令解压 接着直接cd进 ...
- Spring AOP笔记
AOP的核心概念 AOP(Aspect-Oriented Programming)面向切面编程可以实现横切点与他们所影响的对象之间的解耦.如将公共的日志.权限.事务等业务隔离出来,但不影响原来程序的逻 ...
- 热爱编程,热爱生活,快速适应IT新技术
现在新技术层出不穷,我们没有那么多时间去深入学习每一门.对于大多数技术,我们只需要搞懂概念部分,从宏观上了解一下,决定我们要不要深入地去学习它.有了这些了解,就能轻松地与别人聊天了,也可以为以后技术选 ...
- 撩课-Java每天5道面试题第13天
撩课Java+系统架构点击开始学习 96.JDBC操作数据库的步骤 ? .加载数据库驱动 .创建并获取数据库链接 .创建jdbc statement对象 .设置sql语句 .设置sql语句中的参数(使 ...
- C/C++服务器开发的必备利器–libconfig
http://www.leoox.com/?p=311 程序肯定需要一份配置文件,要不然,自己的程序不是“可配置”的,自己都不好意思往“高大上”靠拢.言归正传,以前自己写代码,配置文件的读写都是各式各 ...
- golang 字符串与整数, 布尔转换 strconv
strconv 是golang对于字符串和基本数据类型之间的转换字符串转整数testStr := "1000" testInt, err := strconv.Atoi(testS ...
- html圆形头像的制作
<html> <head><title>圆形头像的制作</title> <style type="text/css">. ...
- python接口自动化3-自动发帖(session)
前言 上一篇模拟登录博客园,但这只是第一步,一般登录后,还会有其它的操作,如发帖,评论等,这时候如何保持会话呢? (敲黑板!!!由于博客园最近登录机制变了,登录全部走cookie登录) 一.sessi ...
- DIV元素不换行
DIV盒子默认是换行独占100%宽度:DIV盒子没有赋予CSS样式时,默认DIV盒子是独占一行(宽度为100%). 如下默认情况HTML代码: <!DOCTYPE html> <ht ...
- Excel 批量快速合并相同的单元格:数据透视表、宏代码、分类汇总
Excel 批量快速合并相同的单元格 在制作Excel表格的时候,为了使得自己制作的报表更加简洁明了,方便查阅,经常需要合并很多相同的单元格,如果有几千几万条记录需要合并的话,真的会让人发疯.怎样 ...