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 ...
随机推荐
- Easyui datagrid 隐藏多选框 checkbox
在加载 表格的时候添加事件:onLoadSuccess 在事件中写入下面句,用空代替原有HTML 达到取消效果. $(".datagrid-header-check").html( ...
- dependency:copy-dependencies使用,如何排除应用自身module
相信用法参考:https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html#includeG ...
- CSS3 animation动画
CSS3 animation动画 1.@keyframes 定义关键帧动画2.animation-name 动画名称3.animation-duration 动画时间4.animation-timin ...
- java 把json对象中转成map键值对
相关:Json对象与Json字符串的转化.JSON字符串与Java对象的转换 本文的目的是把json串转成map键值对存储,而且只存储叶节点的数据 比如json数据如下: {responseHeade ...
- 【Hadoop】伪分布式环境搭建、验证
Hadoop伪分布式环境搭建: 自动部署脚本: #!/bin/bash set -eux export APP_PATH=/opt/applications export APP_NAME=Ares ...
- 用C++实现文件压缩(1.5)
今天主要做的就是,将完成huffman编码的数据以二进制的形式写入文件中.这是个挺苦逼的活. 不过好在我以前玩过一段时间的单片机,所有能够较好的实现位运算,一位一位的将数据存放到缓冲区中,然后统一写入 ...
- 倍福TwinCAT(贝福Beckhoff)常见问题(FAQ)-如何让不同的PLC程序分线程运行 TC3
右击Tasks,添加一个新的Task 可以为这个线程设置自定义的扫描周期 然后在项目上右击添加Referenced Task 在TaskSub1上右击添加现有项,把之气写好的PRG程序绑定 ...
- css - inline\inline-block\block
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- hibernate.cfg.xml文件连接mySql、Oracle、SqlServer配置
1.连接mySql,文件配置如下: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibe ...
- asp.net web系统开发浏览器和前端工具
1. Firefox浏览器+firebug插件 下载安装Firefox浏览器后,在菜单-附加组件-扩展中,搜索firebug,下载长得像甲虫一样的安装. 在web调试中,直接点击右上角的虫子,即可调出 ...