SSH相关操作


SSH相关操作

生成ssh密匙:
ssh-keygen -t rsa

ssh数据地址:
~/.ssh

公匙 :
~/.ssh/id_rsa_pub

私匙:
~/.ssh/id_rsa_public

为GIT生成密匙:
Git方:
git config –user. name/email
相当等于配置一下的连接

Ssh方:
ssh-keygen -t rsa -C ‘git_email’

注意:先查ssh是否已有rsa. 执行这条命令时,按回车三次密码为空,这里不设置密码,在你上传代码到git的时候,就不需要每次都要输入密码了

接下来:
1复制公匙~/ssd/id_rsa_pub

2粘贴到 github 官方提供 ssh 密匙设置点

3建立信任连接:

ssh -T git@github.com

接下来:
输入在github的用户名,密码

常见问题 :

连接失败

解决方法:
ssh-agent bash

ssh-add ~/.ssh/id_rsa

这时已经生成了新的公匙:

重新复制粘贴到github的sshkey的设置点即可


Author: DaMing
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source DaMing !
 Previous
PHPfpm/Nginx PHPfpm/Nginx
Nginx PHPfpm phpfpm配置文件:termux-chrootvim /etc/php-fpm.d/www.conf nginx配置文件: 在proot环境下, 然后编辑配置文件nginx.conf vim /etc/ngin
2020-04-02 DaMing
Next 
Apache Apache
Apache 启动:apachectl start/stop/status 重启:systemctl restart apache2 Apache首先提供PHP页面:/etc/apache2/mods-enabled/dir.conf PH
2020-04-02 DaMing
  TOC