ubuntu搭建ssh服务
本人在ubuntu16.4.4.0-13下测试
#man uname//用于打印系统信息
sudo apt install update
sudo apt install openssh-server
若是出现:

解决方法:

gedit /ect/ssh/sshd-config
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22 #可以更改端口,但ssh链接是要指明端口号
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0#可以指点某个地址,出于某个安全需要
Protocol 2
# 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
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
#PermitRootLogin prohibit-password#要把这一项注释,才能远程登录root用户
PermitRootLogin yes#增加这一项,
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes#是否允许密钥链接
#AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
# 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'.
UsePAM yes
修改完后,启动服务
先查看端口开启情况
ss -antpl

sudo service ssh start (如果是kail linux >> systemctl start ssh )
查看进程
sudo ps -e |grep ssh
看到有sshd服务就可以啦
ubuntu搭建ssh服务的更多相关文章
- Ubuntu 开启SSH服务以及有关设置:安装,指定端口号、免密登录、远程拷贝
本文所用系统为 Ubuntu 18.04 什么是SSH? 简单说,SSH是一种网络协议,用于计算机之间的加密登录.全名为:安全外壳协议.为Secure Shell的缩写.SSH为建立在应用 ...
- 在windows上搭建SSH服务踩过的坑
前两天安装了windows操作系统,想在windows上做内网穿透,所以就想在windows下启用ssh服务,今天就来讲一下我在搭建ssh服务中遇到的坑. 我显示在Mac下搭建了ssh服务,并且测试通 ...
- ubuntu开启SSH服务远程登录
http://blog.csdn.net/jackghq/article/details/54974141 ubuntu开启SSH服务远程登录
- Ubuntu配置SSH服务
本文主要解决Ubuntu配置SSH服务的问题 1.1.修改可用的agt源 sudo vim /etc/apt/sources.list 1.2.更新代码包 sudo apt-get update 2. ...
- ubuntu 搭建Mercurial 服务(nginx)
ubuntu 搭建Mercurial 服务(nginx) 环境:ubuntu 12.05 Mercurial 步骤: (1)安装nginx 和 Mercurial: sudo apt-get ins ...
- ubuntu开启SSH服务
SSH分客户端openssh-client和openssh-server 如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-g ...
- 如何开启ubuntu的SSH服务
buntu默认并没有安装ssh服务,如果通过ssh链接ubuntu,需要自己手动安装ssh-server,然而SSH分客户端openssh-client和服务端openssh-server,opens ...
- [转] ubuntu开启SSH服务
点击阅读原文 SSH分客户端openssh-client和openssh-server如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo ...
- Ubuntu安装SSH服务
1 SSH服务 Ubuntu默认并没有安装ssh服务,如果通过ssh远程连接到Ubuntu,需要自己手动安装ssh-server(openssh-server). 1.1 检测是否安装SSH服务 出现 ...
随机推荐
- Git-------常用操作记录
说明: 一般情况下,git要将内容提交到本地仓库,都是先将内容提交到暂存区,然后再从暂存区提交到本地仓库. 常用命令(一个简单的示例操作): git init:会默认创建一个分支,命名为master ...
- k8s 1.16.3 yaml声明变化
apiVersion: apps/v1 #变化的 kind: Deployment metadata: name: taint labels: app: taint spec: replicas: 3 ...
- BZOJ 1420: Discrete Root (原根+BSGS)
题意 已知kkk, aaa, ppp. 求 xk≡a (mod p)x^k\equiv a\ (mod\ p)xk≡a (mod p) 的所有根. 根的范围[0,p−1][0,p-1][0,p−1]. ...
- 题解 【NOIP2016】组合数问题
[NOIP2016]组合数问题 Description Input 第一行有两个整数t, k,其中t代表该测试点总共有多少组测试数据,k的意义见[问题描述]. 接下来t行每行两个整数n, m,其中n, ...
- Mockito 2 让我们校验一些行为
在下面的示例中,我们将会模拟(Mock)一个 List 列表. 这是因为绝大部分的人对列表这个接口比较熟悉(例如 add(), get(), clear() 方法). 在实际情况中,请不要 mock ...
- linux 查看内网IP和外网IP
centos7 查看内网的ip,使用ifconfig 或在后面加上参数,都可以查看内网的ip,下面的10.105.33.17 即是内网的ip [root@VM_33_17_centos ~]#ifco ...
- 深入使用Vue + TS
深入使用TS 支持 render jsx 写法 这里一共分两步 首先得先让 vue 支持 jsx 写法 再让 vue 中的 ts 支持 jsx 写法 让 vue 支持 jsx 按照官方做法,安装Bab ...
- win7安装ElasticSearch集群
1.单节点安装请参考上篇博客 http://www.cnblogs.com/lianliang/p/7953754.html 2.集群的安装(这里模拟两个节点) 1)集群的安装,基于之前单节点的安装 ...
- 关于数据库表设计之区域表system_district:省市县街道四级地址表
关于省市县的数据表的设计有两种方式: 一.将其设计成一张表 DROP TABLE IF EXISTS `system_district`; CREATE TABLE `system_district` ...
- 10.矩形覆盖 Java
题目描述 我们可以用2**1的小矩形横着或者竖着去覆盖更大的矩形.请问用n个21的小矩形无重叠地覆盖一个2n的大矩形,总共有多少种方法? 思路 其实,倒数第一列要么就是1个2**1的矩形竖着放,要么就 ...