broken ssh

Karl Auer kauer at
Mon Jun 14 00:57:44 UTC 2010

On Sun, 2010-06-13 at 17:47 -0400, Mark C. Miller wrote:
> >not much difference in the result
> mark at eyore:~$ gksu gedit /etc/ssh/sshd_config
> (gksu:26494): Gtk-WARNING **: cannot open display:

There may be no need to edit this file - check it out with less first:

   less /etc/ssh/sshd_config

If you decide you do need toedit it, the simplest solution is to use a
non-X editor. It will be a pain if you are only used to GUI editors, but
a) it will work just about anywhere, and b) the skills will stand you in
good stead.

So log in to eyore however you can, take a deeeeep breath, and type:

   sudo vi /etc/ssh/sshd_config

You need to know five things:

   - at any given time you will be in either INSERT or EDIT mode. To
     enter new text, position the cursor where you want the new text and
     press "i"; to stop entering new text, press ESCAPE

   - basic editing keys work when in INSERT mode, but only on the text
     you are inserting

   - to delete the character under the cursor, make sure you are not
     in INSERT mode, then press "x"

   - the way to get out without saving is to hit ESCAPE twice (to
     make sure you are not in INSERT mode) then type ":q!" and press

   - the way to SAVE and exit is to hit ESCAPE twice (to make sure
     you are not in INSERT mode) then type ":wq" and press

There are a LOT more things you could learn, but with those few you can
just about edit anything. I strongly suggest that in this case you take
two COPIES of the file. Keep one copy as a backup, edit the other copy,
and when you are satisfied with your changes, copy the edited version
over the original.

Regards, K.

Karl Auer (kauer at                   +61-2-64957160 (h)                  +61-428-957160 (mob)

GPG fingerprint: B386 7819 B227 2961 8301 C5A9 2EBC 754B CD97 0156
Old fingerprint: 07F3 1DF9 9D45 8BCD 7DD5 00CE 4A44 6A03 F43A 7DEF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ubuntu-users mailing list