纯干货/无废话/粘贴使用/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
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值