Skip to content

Latest commit

 

History

History
100 lines (80 loc) · 1.81 KB

starter-kit-tramp.org

File metadata and controls

100 lines (80 loc) · 1.81 KB

Starter Kit Tramp

Starter Kit Tramp

Tramp

Unfortunately currently Cygwin doesn’t support file descriptor passing via unix-domain sockets and it’s not possible to enable ControlMaster (Google Cygwin ssh ControlMaster).

(when *cygwin*
  (setq tramp-use-ssh-controlmaster-options nil))
(setq tramp-default-method "ssh")

Tramp may hung when copying large files through ssh. You can use scp instead.

Usage of SSH

SSH keygen

First generate ~/.ssh/id_rsa.pub at your local computer.

ssh-keygen -t rsa -C "your@email"

Then append content of ~/.ssh/id_rsa.pub at local computer to ~/.ssh/authorized_keys of remote computer.

SSH alias

The basic example:

Host necp
    HostName 10.255.255.1
    User necp

Then ssh to remote server by:

ssh necp

SSH tunnel through transfer server

Make ssh tunnel by:

ssh -fN -L 4321:10.0.0.78:22 necp@10.255.255.1

where 10.0.0.78 is remote server, 10.255.255.1 is transfer server.

To simplify ssh command, set ssh alias:

Host 78
    HostName localhost
    Port 4321
    User qmhe

Then access remote server by:

ssh 78

or:

git clone 78:/path/to/repo .

X

The minimal easiest way to use X.

Cygwin X

Install xinit. Set DISPLAY environment variable:

export DISPLAY=:0

Go to server:

ssh -Y <server>

Xming

Install and launch Xming. Set DISPLAY environment variable:

export DISPLAY=localhost:0

Go to server:

ssh -Y <server>