Ubuntu Server 16.04 LTS初始化
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu Server 16.04 LTS初始化相关的知识,希望对你有一定的参考价值。
1. adduser
[email protected]:~# adduser lwk
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "zh_CN.UTF-8",
LC_ADDRESS = "zh_CN.UTF-8",
LC_MONETARY = "zh_CN.UTF-8",
LC_NUMERIC = "zh_CN.UTF-8",
LC_TELEPHONE = "zh_CN.UTF-8",
LC_IDENTIFICATION = "zh_CN.UTF-8",
LC_MEASUREMENT = "zh_CN.UTF-8",
LC_NAME = "zh_CN.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Adding user `lwk‘ ...
Adding new group `lwk‘ (1001) ...
Adding new user `lwk‘ (1001) with group `lwk‘ ...
Creating home directory `/home/lwk‘ ...
Copying files from `/etc/skel‘ ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for lwk
Enter the new value, or press ENTER for the default
Full Name []: lwk
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
[email protected]:~#
2.sudo权限
usermod -a -G sudo lwk
3.install openssh-server
[email protected]:~# apt install openssh-server
4.添加本地公钥到远程服务器上去
[email protected] ~ $ ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
如果些前已经用当前密钥登录过远程服务器,需要用下面命令从本地删除老的远程服务器列表
[email protected] ~ $ ssh-keygen -f "/home/lwk/.ssh/known_hosts" -R 192.168.1.25
5. ssh登录
[email protected] ~ $ ssh [email protected]
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-87-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
75 packages can be updated.
32 updates are security updates.
Last login: Fri Nov 10 14:53:04 2017 from 192.168.1.4
[email protected]:~$
以上是关于Ubuntu Server 16.04 LTS初始化的主要内容,如果未能解决你的问题,请参考以下文章
在服务器上用U盘安装Ubuntu server 16.04 LTS
Ubuntu Server 16.04 LTS上怎样安装下载安装Nginx并启动
UBUNTU 16.04 LTS SERVER 手动升级 MariaDB 到最新版 10.2
基于Ubuntu Server 16.04 LTS版本安装和部署Django之:测试项目
迁移Linux mint 18.2 apt到Ubuntu Server 16.04 LTS
markdown Instalasi nodejs dengan versi terbaru melalui nvm di Ubuntu Server 16.04 LTS