开发者

Getting permission denied when pushing to git vps server

开发者 https://www.devze.com 2023-04-13 09:12 出处:网络
I installed git for windows, creating my ssh key and uploaded the public to my server. I have this working on my Mac, trying to get it working on my windows machine now.

I installed git for windows, creating my ssh key and uploaded the public to my server.

I have this working on my Mac, trying to get it working on my windows machine now.

I did a :

chmod 700 ~/.ssh/
chmod 600 ~/.ssh/*

Here is an image of me doing a ssh -v gitserveralias

I have a config file that has the gitserveralias and port etc.

Getting permission denied when pushing to git vps server

I tried clearing out the known hosts file also.

My config looks like:

Host serveralias
       User xxx
     开发者_StackOverflow  Hostname 123.234.452.232
       Port 22222
       IdentityFile ~/.ssh/id_rsa
       TCPKeepAlive true
       IdentitiesOnly yes
       PreferredAuthentications publickey

Again I have my setup working fine on my Mac.


Two things to check:

  1. Do you have "PubkeyAuthentication yes" in sshd_config on your server? Try setting it.

  2. Is there an offending key in .ssh/known_hosts? Try removing this file.

0

精彩评论

暂无评论...
验证码 换一张
取 消