Reputation: 868
I'm currently developing a new website with Symfony2. I'm using Github for Version Control. My webhosting is ssh able and I'm using putty to access it.
As far as I know it should be possible to synchronize the latest commit (master) to the webhosting via ssh? (Means after a commit I would like to synchronize the website data to the webhosting to make it public)
I looked up the rsync commend but I don't really find a solution. I tried the following command:
rsync [email protected]:namexy/namexy.git /
Even dough I think I have the SSH Key installed, I got the following error message:
/home/namexy/.ssh/config: line 1: Bad configuration option: sh-rsa
/home/namexy/.ssh/config: terminating, 1 bad configuration options
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(601) [Receiver=3.0.8]
Is this a problem because of the command or some error in the ssh key?
Thanks in advance for your help guys!
Upvotes: 0
Views: 214
Reputation: 52483
You have an error in your ssh-config file. The error message is pretty clear about this:
/home/namexy/.ssh/config: line 1: Bad configuration option: sh-rsa
/home/namexy/.ssh/config: terminating, 1 bad configuration options
You have included an option named sh-rsa that doesn't exist.
It looks like you copied your ssh-pulic key to ~/.ssh/config
instead of ~/.ssh/id_rsa.pub
!
A ssh public-key (rsa) looks somewhat like this ...
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDD3+wBomfzBwA8IXw4x/Ud3kt5541rOw4UVXuJaQbMYXA5lq686AyEbtk3L
...
mNVHcR2J user@host
... while your ~/.ssh/config
should be something like this:
Host github.com github gh
Hostname github.com
User git
IdentityFile ~/.ssh/id_rsa
Upvotes: 1