This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: X via SSH (was: New (Delphi) xlauncher)
On Tue, 23 Jul 2002 9:22 pm, Nick THOMPSON wrote:
> What I could do with is a mode that allows an X session to be setup
> through an SSH tunnel. So I need an SSH client that DOESN'T give me a
> shell, but supports an X11 tunnel, prompts me for the SSH passwd and
> runs a single command (the remote ~/.xinitrc say, and pipes the output
> to a local file). Even better if I can select from a list of hosts at
> startup. Does this xlauncher support that?
>
> Currently, I'm using putty, but it asks for the passwd in a shell window
> which you have to keep open. Any other ideas?
>
> Nick.
I think what you want is the -f option on ssh.
from 'man ssh' (on Linux, but I'm pretty sure it is the same on Cygwin):
-f Requests ssh to go to background just before command execution.
This is useful if ssh is going to ask for passwords or
passphrases, but the user wants it in the background. This
implies -n. The recommended way to start X11 programs at a
remote site is with something like ssh -f host xterm.
-n Redirects stdin from /dev/null (actually, prevents reading from
stdin). This must be used when ssh is run in the background. A
common trick is to use this to run X11 programs on a remote
machine. For example, ssh -n shadows.cs.hut.fi emacs & will
start an emacs on shadows.cs.hut.fi, and the X11 connection will
be automatically forwarded over an encrypted channel. The ssh
program will be put in the background. (This does not work if
ssh needs to ask for a password or passphrase; see also the -f
option.)
Also, see ssh-agent, although I would not suggest storing a ssh private key on
a Windows 9x/ME system, and only on NT with NTFS permissions set up
correctly. Even with a good passphrase, a private key should still be hard
to steal.
For a very good article on ssh key management, see
http://www-106.ibm.com/developerworks/linux/library/l-keyc.html (part 1)
http://www-106.ibm.com/developerworks/linux/library/l-keyc2/ (part 2)
http://www-106.ibm.com/developerworks/linux/library/l-keyc3/ (part 3)
Rasjid.