yongkangchen / remote-sync

Upload your files to remote host after every change. Both SCP/SFTP and FTP are supported.
https://atom.io/packages/remote-sync
MIT License
237 stars 71 forks source link

Error: (SSH) Channel open failure: open failed #98

Open theproducer opened 9 years ago

theproducer commented 9 years ago

After a few minutes of use on an SFTP site, I usually begin to get an SSH error that can only be resolved by closing and reopening the project.

[11:56:22 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/page-6.php to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/page-6.php ... Complete (1933ms)
[12:06:43 AM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ... Complete (1947ms)
[12:07:32 AM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.scss to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.scss ... Complete (1985ms)
[12:14:16 AM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/page-6.php to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/page-6.php ... Complete (1870ms)
[12:17:13 AM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/page-6.php to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/page-6.php ... Complete (1831ms)
[12:18:16 AM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ... Complete (1967ms)
[1:35:29 PM] Connecting: devsite@theproducer.dreamhost.com:22
[1:35:30 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ... Complete (2134ms)
[1:35:58 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ... Complete (2007ms)
[1:46:16 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/page-4.php to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/page-4.php ... Complete (1787ms)
[1:46:36 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/page-4.php to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/page-4.php ... Complete (1826ms)
[1:47:51 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/page-4.php to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/page-4.php ... Complete (1791ms)
[1:48:57 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/page-4.php to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/page-4.php ... Complete (1768ms)
[1:50:23 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ... Complete (2066ms)
[1:51:07 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ... Complete (1869ms)
[1:51:50 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ... Complete (1955ms)
[1:53:02 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ...
Error: (SSH) Channel open failure: open failed
[1:53:48 PM] Upload: /Users/theproducer/Projects/Wordpress/Wordpress Site/style.css to /home/devsite/devsite.sample.com/wp-content/themes/hotel_walloon/style.css ...
Error: (SSH) Channel open failure: open failed
johnsontb commented 9 years ago

This also happens with me. It seems to happen after about 10 connections.

yongkangchen commented 8 years ago

I suggest you can google: Error: (SSH) Channel open failure: open failed and try to find the answers. Sorry that I can not help

scarolan commented 8 years ago

We also have the same issue. Is there some reason you closed this issue? We have no problems with SSH, or with SCP. It only happens when using your plugin.

daverogers commented 8 years ago

"It only happens when using your plugin." - same here.

yongkangchen commented 8 years ago

related to https://github.com/mscdex/ssh2/issues/219

ghost commented 8 years ago

请问老大,这个bug好像还存在,批量上传的时候就会出现,怎么解决呢?

schipplock commented 8 years ago

in my case it helped to ignore the .svn directory and I don't know why it helped but it did:

"ignore": [ ".svn/**" ],

okanatabag commented 7 years ago

You should edit sshd_config file at your host like that TCPKeepAlive yes PermitOpen [host_ip]:[port] AllowTcpForwarding yes PermitTunnel yes

DonRichards commented 6 years ago

2 yrs and I'm still seeing this....

zlatinejc commented 6 years ago

3 yrs

andrecasal commented 6 years ago

Just to be clear, what okanatabag meant was to edit your /private/etc/ssh/ssh_config like this:

Host *
    SendEnv LANG LC_*
    TCPKeepAlive yes

And the SSH Deamon at /private/etc/ssh/sshd_config like this:

#AllowAgentForwarding yes
AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
PermitTunnel yes
#ChrootDirectory none
#VersionAddendum none

But I don't see any reference to PermitOpen [host_ip]:[port] in any file inside /private/etc/ssh/ It doesn't work.

Also, I get 9 successful uploads and the 10th produces the Error: (SSH) Channel open failure: open failed. Restarting Atom gives me 9 more successful uploads. I'm on a macOS High Sierra (10.13.3), running node v8.9.4.

Currently trying to understand how SSH and it's configurations work to see if the problem can be solved thru these configs or some code needs to change within the plugin.

karneaud commented 6 years ago

4 years