Situation: When you slogined machine, but can not run X11 program, please add -X to slogin or ssh.
Details: For a security reason, new environment usually disables the X11 protocol forwarding in default. You should enable this explicitly.
Note: Some cygwin environment does not fully trust the X auth connection. In such case, your X connection looks like to be cut out in short period. If you know the host can be trusted, you can use -Y option. But use with care.
Solution: Use port forwarding function of ssh. ssh's `-L' option can forward a port on a local host to the given host and port on the remote machine.
Example 1: vnc connection : There are machines: local, firewall, and remote. The remote side, you run `vncserver' and want to connect from local through the firewall.
local # ssh -L 30000:remote:30000 firewall
local # vncviewer localhost:30000
Example 2: scp :
local # ssh -L 50000:remote:22 firewall
local # scp -P 50000 localfile localhost:/some/where/to/put/
Suggestion: Check the GSSAPIAuthentication status with 'ssh -v'.
Solution: Please check the ssh_config manual page and understand the situation. If it is OK to not use GSSAPIAuthentication, you can add the folloing line in your ssh's configfile. (~/.ssh/config)
homehost_A# ssh-keygen -t rsaThen a pair of key is created in ~/.ssh/id_rsa (private key) and ~/.ssh/id_rsa.pub (publi key) as default.
homehost_A# ssh-copy-id -i ~/.ssh/id_rsa.pub remotehost_B
homehost_A# ssh remoteost_B