服务器免密登陆
发表于|更新于|server
|总字数:112|阅读时长:1分钟|浏览量:
前言
这篇文章主要介绍
服务器免密登陆
开发环境:macOS
服务器系统:CentOS 7 x64
服务器免密登陆
打开终端输入,下面命令
1
2
3
4
ssh-keygen
ssh-copy-id root@ip
💡root需更换为你登陆的角色
💡ip需更换为你服务器的ip
💡执行ssh-copy-id
后,会让你需入一次服务器密码
💡完成后你会发现执行ssh root@ip
时,无需输入密码了
文章作者: 墨陌默
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 墨陌默!
相关推荐

2019-06-07
给服务器配置https
前言本文主要说如何配置https开发环境:macOS服务器系统:Ubuntu ssh连上服务器,按以下命令安装证书 12345678sudo apt-get install python-software-properties sudo apt-get install software-properties-common sudo sudo add-apt-repository ppa:certbot/certbot sudo sudo apt-get update sudo sudo apt-get install certbot #关掉nginxsudo nginx -s stop #关不掉就用killall nginx sudo certbot certonly --standalone -d www.ouyanting.com #注意这里是你的域名 配置nginx 12345678910111213141516171819202122232425# 下面的域名请自行更换为自己的域名server { listen 80; server_name...

2019-06-06
阿里云服务器无法ssh
前言最近在阿里上买了台esc服务器,但是发现ssh连接不上开发环境:macOS服务器系统:Ubuntu ssh连接不上 ssh root@0.0.0.0后输入密码提示Permission denied, please try again.我不是修改了密码了吗?然后去官方远程连接你试了一下提示login incorrect什么情况❓❓❓❓ 后来发现,修改了密码需要重启服务器😓重启服务器就可以正常ssh上了

2018-11-30
从零开始,搭建ss服务器
前言这里选的是vultr的服务器当然如果你有信用卡的话可以考虑注册使用google clound 免费使用一年最近vultr的东京跟新加坡服务器被墙了,会出现可以ping上但是ssh连接超时的问题,可以考虑去使用其它地方的节点(2018-12-13)⚠️部分地方修改过,导致图片跟文字不一致,一切以文字为准。不懂欢迎留言咨询。 购买VPS服务器 vultr的优势 操作简单 扣费方式:按时付费 便宜:最便宜的只要$2.5/M,支持支付宝、微信。相较于阿里的服务器,一个esc服务器¥47/M,还是有一定的优势 vultr的劣势 最低一次性充值$10 账号注册地址:vultr注册步骤就不说了 充值 创建服务器点击右上角的➕号图标 进入创建服务器页面 选择地区这里推荐选择日本(Tokyo Japan)或者新加波(Singapore Singapore),速度更快。 选择服务器及配置系统选择:我选择的是CentOS...

2025-06-16
从零开始部署博客到阿里云的服务器
购买阿里云的服务器登录到服务器上ssh root@你的服务器ip安装nginx 更新本地软件包索引:sudo apt update 安装nginx: sudo apt install -y nginx 安装https(如果不需要就不用走这一步) apt-get install python-software-properties apt-get install software-properties-common sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install -y certbot python3-certbot-nginx 生成证书 停掉nginx:service nginx stop 生成对应域名的证书:certbot certonly --standalone -d...

2018-12-06
部署博客代码到服务器/github上
前言这篇文章主要介绍部署博客代码开发环境:macOS服务器系统:CentOS 7 x64 部署到github上 打开github新建一个Repository,Repository name为你的githubname.github.io打开博客根目录,执行下面命令 1npm install hexo-deployer-git --save 打开博客根配置文件_config.yml查找url将其值改为https://yourgithubname.github.io/查找deploy将其下面的值改为,下面代码 1234deploy: type: git repo: https://github.com/yourgithubname/yourgithubname.github.io.git branch: master 打包发布,hexo clean && hexo g && hexo...
评论