randy3k / RemoteSubl

Use rmate with Sublime Text, an improved fork of rsub.
327 stars 20 forks source link

Connection refused when opening file on sublime text on Mac mini M1 #31

Open chengguan opened 2 years ago

chengguan commented 2 years ago

Thanks in advance for the great work!

Host: I have install Sublime Text (build 4126) on my Mac. Device: Raspberry pi with Ubuntu 22.04

After I installed rsub on my rpi, I tried using rsub to open text file on device with the following sequence but the connection failed:

chengguan@Chengs-Mac-mini StudioProjects % cat ~/.ssh/config
Host rpi Hostname 192.168.68.122 User ubuntu RemoteForward 52698 localhost:52698% chengguan@Chengs-Mac-mini StudioProjects % ssh rpi -v
OpenSSH_8.1p1, LibreSSL 2.7.3 debug1: Reading configuration data /Users/chengguan/.ssh/config debug1: /Users/chengguan/.ssh/config line 1: Applying options for rpi debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 47: Applying options for debug1: Connecting to 192.168.68.122 [192.168.68.122] port 22. debug1: Connection established. debug1: identity file /Users/chengguan/.ssh/id_rsa type -1 debug1: identity file /Users/chengguan/.ssh/id_rsa-cert type -1 debug1: identity file /Users/chengguan/.ssh/id_dsa type -1 debug1: identity file /Users/chengguan/.ssh/id_dsa-cert type -1 debug1: identity file /Users/chengguan/.ssh/id_ecdsa type -1 debug1: identity file /Users/chengguan/.ssh/id_ecdsa-cert type -1 debug1: identity file /Users/chengguan/.ssh/id_ed25519 type -1 debug1: identity file /Users/chengguan/.ssh/id_ed25519-cert type -1 debug1: identity file /Users/chengguan/.ssh/id_xmss type -1 debug1: identity file /Users/chengguan/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3 debug1: match: OpenSSH_8.9p1 Ubuntu-3 pat OpenSSH compat 0x04000000 debug1: Authenticating to 192.168.68.122:22 as 'ubuntu' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:vyzqB9raWRFbEqHLIHJv5n2gdu3VQR79V2AMjavyAOI debug1: Host '192.168.68.122' is known and matches the ECDSA host key. debug1: Found key in /Users/chengguan/.ssh/known_hosts:1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: Will attempt key: /Users/chengguan/.ssh/id_rsa debug1: Will attempt key: /Users/chengguan/.ssh/id_dsa debug1: Will attempt key: /Users/chengguan/.ssh/id_ecdsa debug1: Will attempt key: /Users/chengguan/.ssh/id_ed25519 debug1: Will attempt key: /Users/chengguan/.ssh/id_xmss debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com debug1: kex_input_ext_info: publickey-hostbound@openssh.com (unrecognised) debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Trying private key: /Users/chengguan/.ssh/id_rsa debug1: Trying private key: /Users/chengguan/.ssh/id_dsa debug1: Trying private key: /Users/chengguan/.ssh/id_ecdsa debug1: Trying private key: /Users/chengguan/.ssh/id_ed25519 debug1: Trying private key: /Users/chengguan/.ssh/id_xmss debug1: Next authentication method: password ubuntu@192.168.68.122's password: debug1: Authentication succeeded (password). Authenticated to 192.168.68.122 ([192.168.68.122]:22). debug1: Remote connections from LOCALHOST:52698 forwarded to local address localhost:52698 debug1: channel 0: new [client-session] debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: pledge: network debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0 debug1: remote forward success for: listen 52698, connect localhost:52698 debug1: All remote forwarding requests processed debug1: Sending environment. debug1: Sending env LC_ALL = en_US.UTF-8 debug1: Sending env LC_CTYPE = UTF-8 Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.15.0-1005-raspi aarch64)

9 updates can be applied immediately. 7 of these updates are standard security updates. To see these additional updates run: apt list --upgradable

Last login: Fri Apr 29 01:46:31 2022 from 192.168.68.105 ubuntu@ubuntu:~$ rsub test.txt debug1: client_input_channel_open: ctype forwarded-tcpip rchan 3 win 2097152 max 32768 debug1: client_request_forwarded_tcpip: listen localhost port 52698, originator 127.0.0.1 port 40900 debug1: connect_next: host localhost ([127.0.0.1]:52698) in progress, fd=7 debug1: channel 1: new [127.0.0.1] debug1: confirm forwarded-tcpip debug1: channel 1: connection failed: Connection refused connect_to localhost port 52698: failed. debug1: channel 1: free: 127.0.0.1, nchannels 2 ubuntu@ubuntu:~$