当前位置: 首页 > 编程日记 > 正文

打通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等直接连通了。

转载于:https://www.cnblogs.com/xiandedanteng/p/3347754.html

相关文章:

使用hql动态创建对象问题

前段时间由于需求要添加报表数据,调整ireport后,打印pdf文件出现数据错位的情况,调试发现不是ireport问题,就查看了后台传送的数据,最后发现传送的对象属性值已经就是错位的,那就是获取对象时出的问题&…

秦州:西瓜书 + 南瓜书 吃瓜系列 14. 降维与度量学习(下)

吃瓜教程——西瓜书南瓜书 Datawhale南瓜书是经典机器学习教材《机器学习》(西瓜书)的公式推导解析指南,旨在让在学习西瓜书的过程中,再也没有难推的公式,学好机器学习。 内容属性:机器学习(理…

从用户角度看,DBMS应当提供哪些功能?

1.定义:提供DDL,供用户使用数据库定义语言创建其想要建立的表,定义三级模式,两级映像。 2.操作:提供DML,供用户可以实现增删改查(追加、删除、更新、查询)等操作。 3.控制&#xff1…

groovy–运算符重载

Groovy支持运算符重载,各种运算符被映射到普通的java对象的方法调用,这就使得开发者可以利用运算符重载的优势来编写自己的Java或者groovy对象。 下面的表格描述了groovy中的操作符所映射到的方法: Operator Method a b a.plus(b) a – …

【组队学习】【32期】吃瓜教程——西瓜书+南瓜书

吃瓜教程——西瓜书南瓜书 航路开辟者:谢文睿、秦州领航员:陈伟峰航海士:谢文睿、秦州 基本信息 开源内容:https://github.com/datawhalechina/pumpkin-bookB 站视频:https://www.bilibili.com/video/BV1Mh411e7VU内…

关键字this引用

要点提示: 关键字this引用独享自身。他也可以在构造方法内部调用另一个类的其他构造方法。 关键字this是指向调用对象本身的引用名。可以用this关键字引用对象的实例成员。 复制代码 例如:下面a的代码使用this来显示地引用独享的radius以及调用他的getAr…

数据库系统DBS的特点

在数据库系统发明以前,人们使用文件系统来管理数据。文件系统具有以下不足: 1.数据冗余(与数据共享相对)和非一致性(文件格式不相容) 2.程序依赖于数据(新任务要写新程序) 3.数据孤立…

Linux 内核进程管理之进程ID

Linux 内核使用 task_struct 数据结构来关联所有与进程有关的数据和结构,Linux 内核所有涉及到进程和程序的所有算法都是围绕该数据结构建立的,是内核中最重要的数据结构之一。该数据结构在内核文件 include/linux/sched.h 中定义,在Linux 3.…

【青少年编程竞赛交流】12月份微信图文索引

12月份微信图文索引 由于“组队学习”这个公众号的功能主要是组织Datawhale社群中的学习者们每个月的组队学习,所以,我另外新建了这个微信公众号“青少年编程竞赛交流”,在这个公众号上分享有关青少年编程方面的知识,带小朋友们参…

获取BT节点信息bittorrent-discovery

2019独角兽企业重金招聘Python工程师标准>>> 获取BT节点信息bittorrent-discovery BT/磁力都是常见的P2P下载方式。用户作为一个节点node从其他用户node或者peer获取文件数据,以完成下载。bittorren-discovery脚本可以探测目标主机通过BT/磁力方式分享所…

面向对象方法综述(工具<方法<思维<价值观)

思想起源于上世纪六十年代(和结构化方法一样) 最早的OOPL:Simula67 最纯的OOPL:Smalltalk smalltalk的贡献:它在系统设计中强调对象概念的统一,引入对象,对象类,方法,实…

第二章例2-2

#include<stdio.h>int main(void){ printf("Programming is fun.\n"); printf("And programming in C is even morn fun!\n"); return 0;}转载于:https://www.cnblogs.com/jiangjiali/p/3352576.html

【组队学习】十二月微信图文索引

十二月微信图文索引 一、组队学习相关 周报&#xff1a; Datawhale组队学习周报&#xff08;第042周&#xff09;Datawhale组队学习周报&#xff08;第043周&#xff09;Datawhale组队学习周报&#xff08;第044周&#xff09;Datawhale组队学习周报&#xff08;第045周&…

shell编程--case判断

case基础语法&#xff1a;格式 case 变量名 invalue1)command;;value2)command;;*)commond;;esac在case程序中&#xff0c;可以在条件中使用|&#xff0c;表示或的意思&#xff0c; 比如 2|3)command;;脚本 [rootlynn-04 shell]# vim case.sh#!/bin/bash read -p "Ple…

【delphi】Byte数组与String类型的转换

string string AnsiString 长字符串&#xff0c;理论上长度不受限制&#xff0c;但其实受限于最大寻址范围2的32次方4G字节&#xff1b; 变量Str名字是一个指针&#xff0c;指向位于堆内存的字符序列&#xff0c;字符序列起始于Str[1]&#xff0c;Str[1]偏移负16个字节的空间…

VC解析XML--使用CMarkup类解析XML

经过今天尝试MFC解析XML串&#xff0c;也算有了不少收获&#xff0c;总结一下。 我是使用的CMarkup类对XML进行操作。 CMarkup好象都是先从一个xml文件里面把内容读出来&#xff0c;再进行解析&#xff0c;搞得我恨不得要把我的CString写到xml文件…

Spring原理总结

写在前面&#xff1a;技术常新&#xff0c;思想常存。 Spring全家桶过于庞大&#xff0c;学习时难以抓住重点&#xff0c;希望通过此文章&#xff0c;让大家更好地去学习这一框架技术。 Spring有两大内功&#xff1a;IoC容器和AOP。这两个东西是不管什么时候都不会改变的。即便…

尚国栋:金融风控贷款违约预测(天池学习赛)

尚国栋是华北电力大学数理系大三的学生&#xff0c;LSGO软件技术团队&#xff08;Dreamtech算法组&#xff09;成员&#xff0c;参加了多期Datawhale的组队学习&#xff0c;荣获多期优秀队长的称号。 希望参与我们线下组队学习的同学&#xff0c;可以在微信公众号后台回复 线下…

树莓派修改密码(有单独屏幕)

在树莓派终端输入 sudo passwd pi改的是派的密码。 注意&#xff1a;和 sudo passwd root区分 Linux有密码保护&#xff0c;输入了看上去和没输入一样&#xff0c;其实已经输入了

Python每日一练0023

问题 如何判断一个文件是否存在 解决方案 这个问题可以分成几类问题 如果这里的文件指的是文件或目录&#xff0c;我们可以用os.path.exists()方法 >>> import os >>> os.path.exists(test) True 如果这里的文件指的是普通的文件&#xff0c;我们可以用os.pa…

火狐拓展开发 基础知识

平时经常碰到一些零碎的知识&#xff0c;或者其他什么好文章/知识点/插件/库等等&#xff0c;因为实在太多书签已插乱...于是想着干脆写个火狐小add-on。 首先找到了这里ADD-ON SDK&#xff1a; Using the Add-on SDK you can create Firefox add-ons using standard Web techn…

尚育鹏:Leetcode刷题总结(数组)

尚育鹏是华北电力大学数理系大二的学生&#xff0c;LSGO软件技术团队&#xff08;Dreamtech算法组&#xff09;成员&#xff0c;参加了多期Datawhale的组队学习。 希望参与我们线下组队学习的同学&#xff0c;可以在微信公众号后台回复 线下组队学习&#xff0c;进入线下组队学…

树莓派实现人脸识别需要做的那些事

1.连接数据库&#xff0c;建表&#xff0c;用来存放图像转码后的字符 2.用Pycharm连接上树莓派 3.下载安装face_recognition需要的依赖 4.配置好环境后运行代码

spring boot 实战 / 可执行war启动参数详解

概述 上一篇文章《spring boot 实战 / mvn spring-boot:run 参数详解》主要讲解了spring boot 项目基于maven插件启动过程中借助profiles的切换工作环境的问题。  这里我们讲一下spring boot项目基于可执行war包启动过程中借助profiles切换工作环境的问题。 配置 这里我们修改…

1476. Lunar Code

http://acm.timus.ru/problem.aspx?space1&num1476 由于前一列对后一列有影响&#xff0c;所以需要保持前一列的状态&#xff0c; 但无需用状态压缩来保存&#xff08;也保存不了&#xff09; 只需要保存前一列以 k 个0结尾的个数就可以 代码&#xff1a; import java.mat…

【组队学习】【33期】吃瓜教程——西瓜书+南瓜书

吃瓜教程——西瓜书南瓜书 航路开辟者&#xff1a;谢文睿、秦州领航员&#xff1a;潘磊航海士&#xff1a;谢文睿、秦州 基本信息 开源内容&#xff1a;https://github.com/datawhalechina/pumpkin-bookB 站视频&#xff1a;https://www.bilibili.com/video/BV1Mh411e7VU内容…

FIRST集与FOLLOW集构造步骤

首先&#xff0c;这两个集主语是候选式&#xff0c;是V*中的一个终结符/非终结符。 由于FOLLOW集的定义和构造步骤里面都涉及FIRST集&#xff0c;故先介绍FIRST集。 一.FIRST集的定义如下&#xff1a; FIRST(α){a|α>aβ, a∈Vt, α, β∈V*},若α>(*)ε则规定ε∈FRIS…

Bossie Awards 2013:最佳开源数据中心和云软件

当Facebook 的开源计算项目&#xff08;OCP&#xff09;酝酿着设计更好的服务器和网络时&#xff0c;其他开源项目也纷纷重塑数据库&#xff0c;应用平台以及下一代应用程序的虚拟化层。你还不知道吧&#xff0c;下一代的“云”基础设施管理工具终将来自开源产品。 近日&#x…

Laravel开启跨域的方法

1、建立中间件Cors.php 命令&#xff1a;php artisan make:middleware Cors 在/app/Http/Middleware/ 目录下会出现一个Cors.php 文件。 内容如下&#xff1a; <?phpnamespace App\Http\Middleware;use Closure;class Cors {/*** Handle an incoming request.** param \Il…

【组队学习】【33期】动手学数据分析

动手学数据分析 航路开辟者&#xff1a;陈安东、金娟娟、杨佳达、老表、李玲、张文涛、高立业领航员&#xff1a;张文恺航海士&#xff1a;武帅、戴治旭、初晓宇 基本信息 内容属性&#xff1a;精品入门课系列开源内容&#xff1a;https://github.com/datawhalechina/hands-…