title: Tinkerwell on Remote Host using ProxyCommand? JumpHost ssh
body: <p>Trying to get Tinkerwell (for Laravel and General PHP development) to connect to a remote host, that is only connected to using a ProxyCommand.</p>
  <p>Our remote dev servers are using Coder.com which uses a CLI to write a bunch of entries to your ~/.ssh/config. Each workspace does not have a set IP, and it changes every time it boots since it is on K8 on GKE. Below is what it is adding to my ssh config, with the workspace name swapped out for &quot;example&quot;</p>
  <pre><code>Host coder.example
          HostName coder.example
          ProxyCommand /Users/xan/./coder tunnel example 12213 stdio
          StrictHostKeyChecking no
          ConnectTimeout=0
          IdentitiesOnly yes
          IdentityFile=&quot;/Users/xan/.ssh/coder_enterprise&quot;
          ControlMaster auto
          ControlPath ~/.ssh/.connection-coder.e2e2f398d4bf1e82cf846f4d30b10c48
          ControlPersist 600
  </code></pre>
  <p>VS Code picks up on this connection just fine. The <code>coder</code> CLI has a command that is <code>coder tunnel [workspace] [remote port] [local port]</code> and you can see in the &quot;ProxyCommand&quot; section of the ssh config that it is using this command to &quot;stdio&quot; in order to allow an ssh connection via <code>ssh coder.example</code></p>
  <p>Now, Tinkerwell mentions they don't support ProxyJump or ProxyCommand automatically, and to use a JumpHost. Every way I've tried to set this up has made no difference, and I'm not sure if it will because it is actually my machine I am connecting through. Source: <a href="https://tinkerwell.app/blog/using-proxyjump-to-connect-to-a-remote-host-behind-a-firewall" rel="nofollow noreferrer">https://tinkerwell.app/blog/using-proxyjump-to-connect-to-a-remote-host-behind-a-firewall</a></p>
  <p>If I follow along with the article, and try to connect with port 22 it says connection refused in the terminal when I hit connect with Tinkerwell. I think that's because Coder is using port 12213 as you can see in the ProxyCommand in the ssh config.</p>
  <p>If I try <code>ssh -NL 2222:localhost:12213 coder.example</code> it actually does spin for quite some time instead of immediately erroring, almost as if it's going to finally connect. But then it outputs the following error:</p>
  <pre><code>Error: Timed out while waiting for handshake
  DEBUG: Local ident: 'SSH-2.0-ssh2js0.4.10'
  DEBUG: Client: Trying localhost on port 2222 ...
  DEBUG: Client: Connected
  DEBUG: Parser: IN_INIT
  DEBUG: Parser: IN_GREETING
  DEBUG: Parser: IN_HEADER
  DEBUG: Remote ident: 'SSH-2.0-0.0.1'
  DEBUG: Outgoing: Writing KEXINIT
  DEBUG: Parser: IN_PACKETBEFORE (expecting 8)
  DEBUG: Parser: IN_PACKET
  DEBUG: Parser: pktLen:524,padLen:19,remainLen:520
  DEBUG: Parser: IN_PACKETDATA
  DEBUG: Parser: IN_PACKETDATAAFTER, packet: KEXINIT
  DEBUG: Comparing KEXINITs ...
  DEBUG: (local) KEX algorithms: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
  DEBUG: (remote) KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1
  DEBUG: KEX algorithm: ecdh-sha2-nistp256
  DEBUG: (local) Host key formats: ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
  DEBUG: (remote) Host key formats: ecdsa-sha2-nistp256
  DEBUG: Host key format: ecdsa-sha2-nistp256
  DEBUG: (local) Client-&gt;Server ciphers: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc,arcfour256,arcfour128,cast128-cbc,arcfour
  DEBUG: (remote) Client-&gt;Server ciphers: aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
  DEBUG: Client-&gt;Server Cipher: aes128-ctr
  DEBUG: (local) Server-&gt;Client ciphers: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc,arcfour256,arcfour128,cast128-cbc,arcfour
  DEBUG: (remote) Server-&gt;Client ciphers: aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
  DEBUG: Server-&gt;Client Cipher: aes128-ctr
  DEBUG: (local) Client-&gt;Server HMAC algorithms: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,hmac-sha2-256-96,hmac-sha2-512-96,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
  DEBUG: (remote) Client-&gt;Server HMAC algorithms: hmac-sha2-256-etm@openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96
  DEBUG: Client-&gt;Server HMAC algorithm: hmac-sha2-256
  DEBUG: (local) Server-&gt;Client HMAC algorithms: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,hmac-sha2-256-96,hmac-sha2-512-96,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
  DEBUG: (remote) Server-&gt;Client HMAC algorithms: hmac-sha2-256-etm@openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96
  DEBUG: Server-&gt;Client HMAC algorithm: hmac-sha2-256
  DEBUG: (local) Client-&gt;Server compression algorithms: none,zlib@openssh.com,zlib
  DEBUG: (remote) Client-&gt;Server compression algorithms: none
  DEBUG: Client-&gt;Server compression algorithm: none
  DEBUG: (local) Server-&gt;Client compression algorithms: none,zlib@openssh.com,zlib
  DEBUG: (remote) Server-&gt;Client compression algorithms: none
  DEBUG: Server-&gt;Client compression algorithm: none
  DEBUG: Outgoing: Writing KEXECDH_INIT
  DEBUG: Parser: IN_PACKETBEFORE (expecting 8)
  DEBUG: Parser: IN_PACKET
  DEBUG: Parser: pktLen:300,padLen:17,remainLen:296
  DEBUG: Parser: IN_PACKETDATA
  DEBUG: Parser: IN_PACKETDATAAFTER, packet: KEXECDH_REPLY
  DEBUG: Checking host key format
  DEBUG: Checking signature format
  DEBUG: Verifying host fingerprint
  DEBUG: Host accepted (verified)
  </code></pre>
  <p>Not sure if there's something I'm missing to be able to connect using JumpHost or something else weird with SSH to trick Tinkerwell into thinking this is local.</p>