https://blog.51cto.com/u_13438667/2117175

https://www.cnblogs.com/ftl1012/p/ssh.html

当使用~/.ssh/config里的别名连接gerrit,会报错:Permission denied (publickey).

ssh -i key root@192.168.0.32

windows上可能会报:Permissions for 'xxx' are too open.或者Permission denied (publickey)错误,解决办法(chmod 600 密匙名.pem):https://blog.csdn.net/weixin_44806146/article/details/129260136 (只保留当前用户的所有权限) ,如果当前用户是admin用户,则执行命令打开cmd也要使用用户权限打开。

Host key verification failed:https://blog.csdn.net/ouyang_peng/article/details/83115290 执行ssh-keygen -R hostname即解决。

scp上传与下载文件

https://blog.csdn.net/tyustli/article/details/122453051

  • 上传:
    scp -P 22 .\test.md tyustli@192.168.10.18:/home/tyustli/temp // -P 22 参数可选

scp上传文件夹报错:not a regular file:加上-r参数

  • 下载:
    scp -P 22 tyustli@192.168.10.18:/home/tyustli/temp/make/makefile ./ // -P 22 参数可选

ssh服务无法启动的问题排查

通过/usr/sbin/sshd -T会返回ssh无法启动的原因

  • 情况一:sshd: no hostkeys available -- exiting.
    执行ssh-keygen -A之后重启ssh即可

ssh客户端

分类: ssh

0 条评论

发表回复

您的电子邮箱地址不会被公开。