[转载]Ubuntu下ssh服务的安装与登陆(ssh远程登陆)
转载地址:http://blog.csdn.net/zht666/article/details/9340633
Ubuntu默认并没有安装ssh服务,如果通过ssh远程连接到Ubuntu,需要自己手动安装ssh-server。
判断是否安装ssh服务,可以通过如下命令进行:
ps -e|grep ssh
输出如下:
zht@zht-Ubuntu:~$ ps -e|grep ssh
2151 ? 00:00:00 ssh-agent
5313 ? 00:00:00 sshd
ssh-agent表示ssh-client启动,sshd表示ssh-server启动了。
如果缺少sshd,说明ssh服务没有启动或者没有安装。
安装ssh-client命令:sudo apt-get install openssh-client
安装ssh-server命令:sudo apt-get install openssh-server
安装完成以后,先启动服务:sudo /etc/init.d/ssh start
启动后,可以通过“ps -e|grep ssh”查看是否正确启动。
ssh服务默认的端口是22,可以更改端口,使用如下命令打开ssh配置文件:
sudo gedit /etc/ssh/sshd_config
配置文件内容如下:
- # Package generated configuration file
- # See the sshd(8) manpage for details
- # What ports, IPs and protocols we listen for
- Port 22
- # Package generated configuration file
- # See the sshd(8) manpage for details
- # What ports, IPs and protocols we listen for
修改端口号(Port)后,重启ssh服务即可生效,命令如下:
sudo /etc/init.d/ssh restart
ssh服务启动后,即可登陆,登陆命令格式为:ssh 帐号@IP地址
例如:ssh test@192.168.135.249
根据提示输入test的密码,即可远程登陆。
退出远程登陆命令:exit
演示如下图所示:
[转载]Ubuntu下ssh服务的安装与登陆(ssh远程登陆)的更多相关文章
- 转载:Ubuntu下deb包的安装方法
转载:Ubuntu下deb包的安装方法,http://blog.csdn.net/kevinhg/article/details/5934462 deb是debian linus的安装格式,跟red ...
- Ubuntu 下 firebird 数据库的安装和配置
Ubuntu 下 firebird 数据库的安装和配置 1.简介 本文主要是 Ubuntu 下 firebird 数据库的安装和目录迁移,同样适用于 Debian 系统:Ubuntu 20.0.4 f ...
- Ubuntu 下 Mariadb 数据库的安装和目录迁移
Ubuntu 下 Mariadb 数据库的安装和目录迁移 1.简介 本文主要是 Ubuntu 下 Mariadb 数据库的安装和目录迁移,同样适用于 Debian 系统:Ubuntu 20.0.4 M ...
- Ubuntu下deb包的安装方法 (zz)
Ubuntu下deb包的安装方法 分类: Ubuntu10使用技巧 2010-10-11 23:49 42969人阅读 评论(3) 收藏 举报 ubuntudebdebianlinux deb是deb ...
- ubuntu下deb包的安装方法
ubuntu下deb包的安装方法 简介 deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.deb dpkg 是Debian P ...
- UBUNTU下Y86模拟器的安装和使用
UBUNTU下Y86模拟器的安装和使用 由于上周在虚拟机中安装Y86模拟器中出现了一些问题并且没得到解决,所以上周实验是在实验楼上做的,这几天练习了UBUNTU下Y86模拟器的安装和使用. 参考博客: ...
- 腾讯云ubuntu下mysqli服务的开启
腾讯云ubuntu下mysqli服务的开启 今天晚上搞了好久,在本地操作系统deepin下操作完全无需开启mysqli模块,自动就开启了.这次介绍一下服务器ubuntu下mysqli模块的开启. 首先 ...
- Opencv 2.4.9在Ubuntu下的配置与安装
[原]Opencv 2.4.9在Ubuntu下的配置安装 Opencv 2.4.9在Ubuntu下的配置与安装 surgewong@gmail.com http://blog.csdn.net/su ...
- ubuntu下opencv2.4.9安装测试
ubuntu下opencv2.4.9安装测试 whowhoha@outlook.com 一.依赖包安装 1. build-essential 软件包 sudo apt-get install bui ...
- 【转】Ubuntu下deb包的安装方法
[转]Ubuntu下deb包的安装方法 deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.deb dpkg 是Debian P ...
随机推荐
- kvm初体验——linux之kvm安装及使用qemu工具安装系统【转】
本文转载自:https://blog.csdn.net/Heimerdinger_Feng/article/details/79119445 一.安装虚拟机之前先升级软件仓库 sudo apt-get ...
- 用代码实现断开Android手机USB连接【转】
本文转载自:https://blog.csdn.net/phoebe_2012/article/details/47025309 用代码实现断开Android手机USB连接 ...
- HDU 3466 Proud Merchants 排序 背包
题意:物品有三个属性,价格p,解锁钱数下线q(手中余额>=q才有机会购买该商品),价值v.钱数为m,问购买到物品价值和最大. 思路:首先是个01背包问题,但购买物品受限所以应先排序.考虑相邻两个 ...
- 用SQL语句删除除了id不同,其他都相同的学生表信息
delete from <table_name> wehere id not in (select max(id) from <table_name> group by < ...
- org.hibernate.TypeMismatchException: Provided id of the wrong type for class cn.itcast.entity.User. Expected: class java.lang.String, got class java.lang.Integer at org.hibernate.event.internal.Defau
出现org.hibernate.TypeMismatchException: Provided id of the wrong type for class cn.itcast.entity.User ...
- npm全局安装
时间长了,很多东西都忘了. 全局安装以后,在你自己的电脑任何位置都可以使用的包.直接用命令使用的: 比如:supervisor mok 还有cnpm,express之类的.gulp之类的. 剩下的我们 ...
- 15-THREE.JS 方向光
<!DOCTYPE html> <html> <head> <title></title> <script src="htt ...
- Disruptor_学习_00_资源帖
一.官方 disruptor-github disruptor-api LMAX Disruptor 二.精选资料 Disruptor入门-官方文档翻译-方腾飞 Disruptor官方文档实现 Dis ...
- LeetCode OJ:Count and Say(数数)
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...
- Python网络编程2018-01-26更新
前言:使用python3.x写的socket编程,本人wechat:YWNlODAyMzU5MTEzMTQ=. 如果内容有错,请指出来. ssh服务端 # 1.接收一个连接实例 # 2.接收数据 # ...