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.
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.
The basic example:
Host necp HostName 10.255.255.1 User necp
Then ssh to remote server by:
ssh necp
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 .
The minimal easiest way to use X.
Install xinit. Set DISPLAY environment variable:
export DISPLAY=:0
Go to server:
ssh -Y <server>
Install and launch Xming. Set DISPLAY environment variable:
export DISPLAY=localhost:0
Go to server:
ssh -Y <server>