跳至主要内容

博文

目前显示的是 一月, 2020的博文

EC2 实例启用密码登录

解决方法 1.    从 SSH 客户端,登录到您的 EC2 实例。 使用以下用户名之一: 对于 Amazon Linux,用户名为 ec2-user 。 对于 RHEL 5,用户名为 root 或 ec2-user 。 对于 Ubuntu,用户名为 ubuntu 。 对于 SUSE Linux,用户名为 root 或 ec2-user 。 如果 ec2-user 或 root 无法使用,请与您的 AMI 提供商核实。 2.    为用户设置密码。以下示例使用 ec2-user 作为用户: $ sudo passwd ec2-user Changing password for user ec2-user. New password: Retype new password: 例如,成功的响应类似于以下示例: passwd: all authentication tokens updated successfully. 3.    更新 /etc/ssh/sshd_config 文件中的 PasswordAuthentication 参数: PasswordAuthentication yes 4.    重新启动 SSH 服务。 对于 Amazon Linux、RHEL 5 和 SUSE Linux,请使用以下命令: sudo service sshd restart 对于 Ubuntu,请使用以下命令: sudo service ssh restart 5.    退出 SSH 客户端,然后登录以测试密码身份验证。

docker解决stdout log文件越来越大的问题

Edit the daemon configuration file: $ vim /etc/docker/daemon.json Add the following lines to file: { "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "3" } } Restart the docker daemon: systemctl restart docker  Chinese File with mirrors { "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "3" }, "registry-mirrors": [ "https://dockerhub.azk8s.cn", "https://n6mdpfki.mirror.aliyuncs.com", "https://reg-mirror.qiniu.com", "http://hub-mirror.c.163.com", "https://docker.mirrors.ustc.edu.cn", "https://registry.docker-cn.com" ] }