Ubuntu17 root ssh
Ubuntu provides OpenSSH (OpenBSD Secure Shell) in its universe repositories, which is a suite of security-related network-level utilities based on the SSH protocol.
1. To install it, open terminal (Ctrl+Alt+T) or log in Ubuntu server and run command:
sudo apt-get install openssh-server
2. After that, you should have SSH service enabled in your system, you may check its status by running command:
sudo service ssh status
3. You may change some settings (e.g., the listening port, and root login permission) by editing the configuration file via command:
sudo nano /etc/ssh/sshd_config
On Ubuntu desktop, you may use gedit
instead of nano
: add this command in file
PermitRootLogin yes
StrictModes yes
Finally apply the changes by restarting or reloading SSH:
sudo service ssh restart
以上内容完全盗版自:
http://ubuntuhandbook.org/index.php/2016/04/enable-ssh-ubuntu-16-04-lts/
在这里郑重的说一句,盗版要盗全套,哈哈哈~~~
由于不习惯使用非root用户,直接启用root账户方法:
1、修改root 密码:
sudo passwd root
输入两次root用户密码
2、创建 /etc/lightdm/lightdm.conf
vi /ect/lightdm/lightdm.conf
输入一下内容:
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true
3、重启系统
4、用root登录桌面后,会弹出 读取/root/.profile时发现错误:mesg:ttyname failed:对设备不适当的ioctl操作 信息,解决办法:
将/root/.profile文件中的mesg n
替换成tty -s && mesg n
5、重启。
参考文章:
http://www.configserverfirewall.com/ubuntu-linux/enable-ubuntu-desktop-root-login/
Ubuntu17 root ssh的更多相关文章
- Permissions 0664 for '/home/root/.ssh/id_rsa' are too open.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY @ @@@ ...
- root权限下找不到 /root/.ssh目录
Xshell配置ssh登陆远程服务器,找不到 root/.ssh目录,报错信息如下: root@ubuntu:/home/xinxin# cd /root/.ssh/bash: cd: /root/. ...
- Add correct host key in /root/.ssh/known_hosts to get rid of this message
bug: Add correct host key in /root/.ssh/known_hosts to get rid of this message 解决办法: rm ~/.ssh/known ...
- 一直出现 Enter passphrase for key '/root/.ssh/gitkey12.pub'
案例: 我一下没有设置密码的pub key, 一使用就要求: Enter passphrase for key '/root/.ssh/gitkey12.pub', 原因:本该设置私钥的地方,设置 ...
- ssh:Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open
最近,用ssh连接github时,突然提示“Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open”,并且断开连接. 仔细阅读了一下ssh文档和这句 ...
- ansible Failed to connect to the host via ssh: no such identity: /root/.ssh/id_rsa.bak
中控机和远端主机配置完密钥后,在中控台上通过ansible检测联通性 ansible -i inventory.cfg all -m ping 10.1.1.1 | UNREACHABLE! => ...
- linux 限制root SSH登陆和限制su
linux 限制root用户SSH登录: 1.修改SSHD服务的配置文件/etc/ssh/sshd_config 将#PermitRootLogin yes 改为PermitRootLogi ...
- Ubuntu 17.04 允许使用root ssh登录
用ubuntu 17.04部署完docker后,用winscp去管理系统上的文件发现默认的管理员账号权限不够,想重新用root登录,发现一只被服务器拒绝(permission denied).已经执行 ...
- centos7 禁止 root ssh login
CentOS 7 默认容许任何帐号透过 ssh 登入,包括 root 和一般帐号,为了不让 root 帐号被黑客暴力入侵,我们必须禁止 root 帐号的 ssh 功能,事实上 root 也没有必要 s ...
随机推荐
- iOS数据库的基本使用
今天总结下数据库的基本使用方法: iOS使用的数据库一般就是sqlite3,在使用该数据库前一定要先导入数据库框架,否则会出错,接下来引入头文件#import<sqlite3.h> 在工程 ...
- JNI概述
JNI是Java Native Interface的缩写,它提供了若干的API实现了Java和其他语言的通信(主要是C&C++). JNI 让你在利用强大 Java 平台的同时,使你仍然可以用 ...
- SQL Server Latch Classes Library
https://www.sqlskills.com/help/latches/ (Companion SQL Server Wait Types Library) This site lists al ...
- VS2017安装错误:工作负荷不完整,未能安装包“sqlcmdlnutils,version=15.1.61703.130,chip=x64,language=zh-CN”。
场景:已安装的VS2017维护安装MVC4时出现如下错误: 看问题描述是由于sqlcmdlnutils安装失败影响到其它组件的安装,于是单独下载此安装包进行安装,发现安装一切正常,继续维护VS2017 ...
- 使用CSS实现自定义input[checkbox]样式
思路:使用label上的for熟悉,与checkbox上的id相对应来达到点击选中效果,在使用伪元素,或者其他元素,定位至checkbox上方,替代checkbox,并且隐藏checkbox,使用CS ...
- iOS开发笔记_4自定义TabBar
新博客:http://www.liuchendi.com 好多APP都使用的是自定义的TabBar,那这个功能应该如何实现呢?首先应该解决的问题就是,加载NavigationController的时候 ...
- ORA-12537:TNS连接已关闭
安装完11i的VIS版本后,客户端连接数据时会报“ORA-12537:TNS连接已关闭”,在网上找到以下解决办法: 今天在远程客户端配置EBS数据库连接的时候发生“ORA-12537:TNS连接已 ...
- Silverlight游戏设计(Game Design):(十四)练习用游戏素材资源的获取及相关工具使用心得 --转
Silverlight游戏设计(Game Design):(十四)练习用游戏素材资源的获取及相关工具使用心得 通过前6节的Demo制作演示,大家应该已经相当熟悉这款Silverlight-2D游戏场景 ...
- ylbtech-LanguageSamples-CommandLine(命令行参数)
ylbtech-Microsoft-CSharpSamples:ylbtech-LanguageSamples-CommandLine(命令行参数) 1.A,示例(Sample) 返回顶部 “命令行参 ...
- javascript快速入门9--引用类型
引用类型通常叫做类(class),也就是说,遇到引用值,所处理的就是对象. 注意:从传统意义上来说,ECMAScript 并不真正具有类.事实上,除了说明不存在类,在 ECMA-262 中根本没有出现 ...