Jonáš Jančařík
1 min readJul 30, 2018

--

This is great!

Just a couple extra steps for simplifying things:

1) On your local machine, set up port forwarding

Find (or create) the ssh config file: ~/.ssh/config. (This works in PowerShell on Windows 10 too; the ~ home shortcut will refer you to your user folder. Otherwise go to C:\Users\<username>\.sshSince the Windows 10’s April 2018 Update you should have ssh enabled by default.)

Add this:

Host *
ForwardAgent yes
RemoteForward 52698 127.0.0.1:52698

This way you don’t have to specify the port foward when running ssh and you can just connect withssh user@remotemachine.

2) On your remote machine, set the default port for rmate

Open or create the config file: ~/.rmate.rc.

Add this:

# host: auto # Prefer host from SSH_CONNECTION over localhost
port: 52698
unixsocket: ~/.rmate.socket # Use this socket file if it exists

(I commented out the first line but kept it for reference.)

Now you don’t have to specify the port when running rmate:

rmate filename

--

--

Jonáš Jančařík
Jonáš Jančařík

Written by Jonáš Jančařík

Data analyst, formerly technologist @ECThinkTank (http://medium.com/@ECThinkTank) @EU_Commission think tank.

No responses yet