Results 1 to 1 of 1
Thread: ssh -n option
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Aug 2010
ssh -n option
-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
Why is this needed? What is the problem of running it in the background without -n?