如何ssh我的windows服务器

如何ssh我的windows服务器,windows,git,ssh,Windows,Git,Ssh,我已经在我的服务器Windows2008上安装了GitWindows,我还使用GitBash生成密钥 我试图使用这个命令ssh copy iduser@123.45.56.78 /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: ERROR: ssh: co

我已经在我的服务器Windows2008上安装了GitWindows,我还使用GitBash生成密钥

我试图使用这个命令
ssh copy iduser@123.45.56.78

/usr/bin/ssh-copy-id: INFO: 
  attempting to log in with the new key(s), 
  to filter out any that are already installed

/usr/bin/ssh-copy-id: ERROR: 
  ssh: connect to host 123.45.56.78 port 22: Connection refused

我怎样才能修复这个。。。在我的ubuntu服务器上,我只有在windows上才有这个问题。

您必须使用相同的密钥或在主服务器下注册所有密钥

一旦你有了钥匙,你就可以连接了


如何判断钥匙是否复制成功?
在您的案例中,您会看到一个错误,这意味着
ssh copy id
不起作用,因此请遵循下一节:


如果ssh副本id不起作用?
Simpy
cat
并手动将文件复制到服务器,它将为您工作

# Copy the output of private key
# you can also copy the public key if you need to
cat ~/.ssh/id_rsa


如果我没有使用ssh-copy-id,你能给我提供一些步骤吗?ssh-copy-id只有在使用ssh-server的ubunut中才能工作。为你添加了完整的代码片段:-)好的,我按照你的步骤做了。我登录到我的windows服务器,右键单击桌面,在这里选择OpenGitBash。然后发出comand cat~/.ssh/id\u rsa,现在我看到了私钥…我的问题是,我应该将其粘贴到哪里?我想使用我的其他机器对我的windows服务器进行ssh。类似于大多数基于unix的操作系统(并非都是btw),windows没有附带ssh服务器。您需要告诉我们您在Windows服务器上使用的ssh服务器,以便我们能够帮助您。或者您的Windows服务器上没有安装(并正在运行)ssh服务器吗?@slebetman,我没有安装ssh服务器,只是安装了git for Windows。我不知道应该为我的windows服务器安装什么ssh服务器
# Copy the output of private key
# you can also copy the public key if you need to
cat ~/.ssh/id_rsa