ssh config for multiple bitbucket accounts - Simple example, but getting 'remote end hung up unexpectedly'

别来无恙 提交于 2019-12-03 02:15:34

I had the same problem. After i changed permissions of the file ~/.ssh/config to -rw-r--r--, the error

Bad owner or permissions on /home/username/.ssh/config
fatal: The remote end hung up unexpectedly

disappeared.

Write in console:

cd ~/.ssh
chmod 644 config
Ezequiel De Simone

It is regards to RSA file that appears on ../.ssh/ folder I fixed this by deleting any corrupt file and then generate again as you install GitHub.

These commands should fix the problem:

chown $USER ~/.ssh/config
chmod 644 ~/.ssh/config

Prefix with sudo if the files are owned by different user.

If more files are affected, replace config with *.

In man ssh we can read:

Because of the potential for abuse, this file must have strict permissions: read/write for the user, and not writable by others. It may be group-writable provided that the group in question contains only the user.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!