ssh远程登录设置, linux windows 都可以, cat 追加文件到末尾, scp需要再开始出加入端口号-P

Related article:
https://blog.csdn.net/weixin_33832340/article/details/92241463?utm_medium=distribute.pc_relevant_t0.none-task-blog-searchFromBaidu-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-searchFromBaidu-1.control

3、创建秘钥对

ssh-keygen -t rsa

然后把 pub公钥文件 通过qq邮箱 传到 工作站上

4、把公钥移至创建账号家目录对应的目录下,公钥和私钥都下载至本地

cat /tmp/xxxx.pub > /home/xxxx/.ssh/authorized_keys 中间若有目录不存在,直接创建就好
~/.ssh/

最后,我没有重启服务就可以登录了。
when I scp my public key to my workstation, it wrongs.
the reason is that the -P should in fronte of all source&target

5. cat文件操作指令集合:

>> 即为追加文件,>为重写 cat id_rsa* >> targetFile

cat -n file 输出file文件中的全部内容,并且对file文件进行从 1 开始的编

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值