我在win7工作并使用sshd设置git服务器.我git --bare init myapp.git
,正确克隆ssh://git@localhost/home/git/myapp.git
在Cywgin中.但是我需要再次使用Cygwin的配置git ,我想在Git Bash中使用 git clone .我跑步git clone ssh://git@localhost/home/git/myapp.git
并获得以下信息
ssh_exchange_identification: Connection closed by remote host
Run Code Online (Sandbox Code Playgroud)
然后我ssh -vvv git@localhost
在Git Bash中运行并获得消息
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /c/Users/MoreFreeze/.ssh/identity type -1
debug3: Not a RSA1 key file /c/Users/MoreFreeze/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
// above it repeats 24 times
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /c/Users/MoreFreeze/.ssh/id_rsa type 1
debug1: identity file /c/Users/MoreFreeze/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
Run Code Online (Sandbox Code Playgroud)
好像我的私钥有错误的格式?而且我发现私有密钥中只有25行没有BEGIN
和END
.我很困惑为什么它说NOT RSA1键,我完全确保它是RSA 2键.
欢迎任何建议.顺便说一句,我已经在谷歌上阅读了关于这个问题的前三页.
Pac*_*nSV 51
我今天遇到了这个问题,我意识到我已连接到2个不同的网络(LAN和WLAN),我解决了它只是从我的以太网适配器断开电缆.我想问题是由于ssh密钥与我的无线适配器的MAC地址绑定而引起的.我希望这可以帮助你.
Dav*_*wii 13
刚进入;
echo 'SSHD: ALL' >> /etc/hosts.allow
Run Code Online (Sandbox Code Playgroud)
它为我整理出来.
pra*_*upd 12
ssh restart
在linux中点击以下命令
prayag@prayag:~/backup/NoisyNeighbour$ service ssh restart
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.75" (uid=1417676764 pid=5933 comm="stop ssh ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.76" (uid=1417676764 pid=5930 comm="start ssh ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
Run Code Online (Sandbox Code Playgroud)
小智 9
要解决问题,请在 上添加 Git 的主机名~/.ssh/config
,
Host github.com
Hostname ssh.github.com
Port 443
Run Code Online (Sandbox Code Playgroud)
就我而言,github!
我将 /etc/ssh/sshd_config 中的 ssh 端口和 MaxStartups 变量更改为后解决了这个问题,
port 2244
MaxStartups 100
Run Code Online (Sandbox Code Playgroud)
然后,重新启动服务
service sshd restart
Run Code Online (Sandbox Code Playgroud)
如果仍然不起作用,请重新启动系统。
归档时间: |
|
查看次数: |
153620 次 |
最近记录: |