纯干货/无废话/粘贴使用/ssh连接Root登录-国内源安装docker-配置github(ubuntu18.04)

Ubuntu安装SSH并启用root用户远程登录

1.安装ssh,默认不会安装ssh,所以需要手动安装

sudo apt-get install openssh-server openssh-client

2.安装完成后需要重启ssh

sudo /etc/init.d/ssh restart

3.配置root用户远程登录,完成后发现使用ssh连接工具并不能连接上,需要我们更改配置文件

vim /etc/ssh/sshd_config

在文件最后加上下面三行

RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no

安装docker和docker-compose

curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -

添加docker源

sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

更新软件包

apt -y update

安装docker

sudo apt install docker-ce
sudo apt install docker-compose

配置镜像源

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://j7sada02s.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

重启docker

service docker restart

配置github

第一步:
git config --global user.name 's' 
第二步:
git config --global user.email 's@gamil.com'

相关推荐

  1. 快速配置docker 国内地址

    2024-06-15 08:50:04       33 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-15 08:50:04       14 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-15 08:50:04       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-15 08:50:04       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-15 08:50:04       18 阅读

热门阅读

  1. 超文本标记语言(HTML)简介

    2024-06-15 08:50:04       6 阅读
  2. Web Works API 和 Promise 的对比和区别

    2024-06-15 08:50:04       7 阅读
  3. 音视频开发-- 坑整理

    2024-06-15 08:50:04       6 阅读
  4. Pod中使用自定义服务账号调用自定义资源

    2024-06-15 08:50:04       8 阅读
  5. 使用dockerfile能力构建制品并打包容器

    2024-06-15 08:50:04       6 阅读
  6. C# 泛型分析

    2024-06-15 08:50:04       6 阅读
  7. 找工作小项目:day15-macOS支持、完善逻辑

    2024-06-15 08:50:04       5 阅读
  8. 自动化机械臂喷涂生产线方案五

    2024-06-15 08:50:04       7 阅读
  9. AWD攻防比赛流程手册

    2024-06-15 08:50:04       6 阅读
  10. 公链常用的共识算法

    2024-06-15 08:50:04       8 阅读