Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: SSH / RSA issues...

  1. #1
    Join Date
    Jul 2008
    Beans
    8

    SSH / RSA issues...

    I did this:

    $ sudo ssh -D 1080 hyozan@192.168.1.101

    Then it said:

    Warning: Permanently added '192.168.1.101 (RSA) to the list of known hosts.

    Well, I played around with the SSH tunnel, and now I want to remove this IP address from the list of known hosts.

    How do I do that?

    I tried to edit the config file, but got this error:

    [I was in the proper directory when I used this command]

    $ sudo gedit ssh_config
    cannot open display:
    Run 'gedit --help' to see a full list of available command line options.

    I'm not even sure if editing the config file will allow me to remove it from the list of known hosts or not.

    I have two questions:

    How do I remove an address from the list of known hosts?

    Why won't gedit allow me edit the config file?

  2. #2
    Join Date
    Dec 2006
    Location
    Lincolnshire
    Beans
    224
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: SSH / RSA issues...

    Quote Originally Posted by reilus View Post
    I did this:

    $ sudo ssh -D 1080 hyozan@192.168.1.101

    Then it said:

    Warning: Permanently added '192.168.1.101 (RSA) to the list of known hosts.

    Well, I played around with the SSH tunnel, and now I want to remove this IP address from the list of known hosts.

    How do I do that?

    I tried to edit the config file, but got this error:

    [I was in the proper directory when I used this command]

    $ sudo gedit ssh_config
    cannot open display:
    Run 'gedit --help' to see a full list of available command line options.

    I'm not even sure if editing the config file will allow me to remove it from the list of known hosts or not.

    I have two questions:

    How do I remove an address from the list of known hosts?

    Why won't gedit allow me edit the config file?
    rm ~/.ssh/*

  3. #3
    Join Date
    Jul 2008
    Beans
    8

    Re: SSH / RSA issues...

    That is one solution.

    I was able to fix the problem, and here are two solutions I figured out:


    $ sudo nano /home/USERNAME/.ssh/known_hosts

    (nano lets you edit the file, you can clear out the unwanted IP)
    (the path after nano describes the location of the known_hosts file)

    The other solution:

    $ gksudo gedit /home/USERNAME/.ssh/known_hosts

    (I don't know why gksudo is preferred over sudo, but it works)
    (again, the path after gedit is the location of the file)

  4. #4
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: SSH / RSA issues...

    Quote Originally Posted by frankos44 View Post
    rm ~/.ssh/*
    NO ....

    That command will also remove other files in .ssh you might want to keep including keys,

    Either

    rm ~/.ssh/known_hosts

    or edit the file ...
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  5. #5
    Join Date
    Dec 2006
    Location
    Lincolnshire
    Beans
    224
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: SSH / RSA issues...

    Quote Originally Posted by bodhi.zazen View Post
    NO ....

    That command will also remove other files in .ssh you might want to keep including keys,

    Either

    rm ~/.ssh/known_hosts

    or edit the file ...

    I fully agree.... in this case however it is very unlikely he had any keys.

    rm ~/.ssh/known_hosts is better.

  6. #6
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: SSH / RSA issues...

    LOL, I was thinking of what would happen to me if I ran that command

    I was just trying to post a caution to anyone who might have keys.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  7. #7
    Join Date
    Oct 2005
    Beans
    142
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: SSH / RSA issues...

    Quote Originally Posted by reilus View Post
    (I don't know why gksudo is preferred over sudo, but it works)
    gksudo is basically the same thing but gives a graphical prompt.

    Xan

  8. #8
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: SSH / RSA issues...

    It has to do with running X applications as multiple users and root. X has it's own set of security. Without such security features to X you have problems such as key loggers.

    So gksu gives you root access to graphical apps while maintaining security.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  9. #9
    Join Date
    Oct 2005
    Beans
    142
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: SSH / RSA issues...

    Interesting, I hadn't really considered additional levels of security take into account with that -- i'll probably use it more often now.

    Xan

  10. #10
    Join Date
    May 2008
    Beans
    1

    Re: SSH / RSA issues...

    Quote Originally Posted by bodhi.zazen View Post
    LOL, I was thinking of what would happen to me if I ran that command

    I was just trying to post a caution to anyone who might have keys.
    So to the novice you're pointing to the fact one can delete the known_hosts file and it will regenerate when making future connections via ssh, yes? Or would merely cutting and saving from within the file be more appropriate in terms of electron efficiency?

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •