Professional Web Applications Themes

ssh - no known_hosts file - Mac Networking

Hi, I am using ssh and the server I was accessing, which originally worked fine (host was added to known_hosts file) now doesn't work. It might have been following a reinstall via CCC. Not sure cos it was a couple of days ago. So now I have to accept the host every time. No big deal but can anyone tell me how to fix it. What if I just create a known_hosts file where it ex-pects it to be? But then I wouln't have understood what went wrong even if it did work. Thanks Andy...

  1. #1

    Default ssh - no known_hosts file

    Hi, I am using ssh and the server I was accessing, which originally
    worked fine (host was added to known_hosts file) now doesn't work. It
    might have been following a reinstall via CCC. Not sure cos it was a
    couple of days ago.

    So now I have to accept the host every time. No big deal but can anyone
    tell me how to fix it. What if I just create a known_hosts file where it
    ex-pects it to be? But then I wouln't have understood what went wrong
    even if it did work.

    Thanks

    Andy
    nospamatall Guest

  2. #2

    Default Re: ssh - no known_hosts file

    In article <rS6gc.4648$indigo.ie>,
    nospamatall <net> wrote:
     

    Check for the existence and permissions of the directory '~/.ssh' and
    its contents.

    --
    Tom Stiller

    PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
    7BDA 71ED 6496 99C0 C7CF

    Support the 2004 Million Mom March on Washington DC
    Mother's Day, May 9, 2004
    visit <http://www.mmm2004.org/>
    Tom Guest

  3. #3

    Default Re: ssh - no known_hosts file

    Tom Stiller wrote: 
    >
    >
    > Check for the existence and permissions of the directory '~/.ssh' and
    > its contents.
    >[/ref]

    Ok, I found it, but couldn't access it,
    even with sudo:
    sudo: cd: command not found

    or does that mean you don't do things like cd with sudo?

    but logged in as root it's there and has known_hosts file in it. I tried
    repairing permissions but this directory remained the same so it's not
    that. But this would be why ssh can't do anything with it. I could
    change the permissions but then the problem would reappear when I repair
    permissions next, or would it?

    drwxrw-rw- 3 root wheel 102 Feb 15 02:26 .ssh
    -rw-r--r-- 1 root wheel 471 Feb 24 21:32 known_hosts

    and csh is looking for /sw/bin/init.csh which is very strange because
    Terminal never had anything to do with fink as far as I know. (fink is
    gone now)

    I think there's something wrong with permissions generally because tcsh
    can't open /etc/termcap

    actually termcap isn't there. and shouldn't it be looking for .cshrc and
    ..cshlogin? I can't find anything about termcap in csh man.

    Well anyway, could all this be related?

    Or maybe I should just leave it untill I get 10.3. and do a complete new
    install? So far when I tried to sort out a small mess I ended up with a
    bigger mess. Like DIY a bit.

    thanks

    andy
    nospamatall Guest

  4. #4

    Default Re: ssh - no known_hosts file

    On Sat, 17 Apr 2004 13:57:24 +0100,
    nospamatall (net) wrote: 

    cd is a shell builtin. sudo is not a shell.
     

    Very clearly.

    --
    Bev A. Kupf
    "The lyfe so short, the craft so long to lerne" -- Chaucer
    England go three up at Bridgetown!
    Bev Guest

  5. #5

    Default Re: ssh - no known_hosts file

    On Sat, 17 Apr 2004 13:57:24 +0100, nospamatall wrote: [/ref]
     
     

    Use "sudo -s". That will give you a root shell, and in a shell you can
    use "cd".



    --
    Dave Seaman
    Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
    <http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
    Dave Guest

  6. #6

    Default Re: ssh - no known_hosts file

    In article <qR9gc.4675$indigo.ie>,
    nospamatall <net> wrote:
     
    > >
    > >
    > > Check for the existence and permissions of the directory '~/.ssh' and
    > > its contents.
    > >[/ref]
    >
    > Ok, I found it, but couldn't access it,
    > even with sudo:
    > sudo: cd: command not found[/ref]

    Since 'cd' is a shell command, it can't be executed with 'sudo'; you'll
    have do do something like 'sudo sh' to start a root shell first, then
    examine and repair '~/.sh'. 

    When you login as root, '~/.ssh' is root's '.ssh' directory, not the
    same directory as used by your regular user. 

    Fink may be gone, but your environment 'path' variable still includes
    the old '/sw/ directory. 

    It really sounds like thing got ed up with the CCC copy. 

    --
    Tom Stiller

    PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
    7BDA 71ED 6496 99C0 C7CF

    Support the 2004 Million Mom March on Washington DC
    Mother's Day, May 9, 2004
    visit <http://www.mmm2004.org/>
    Tom Guest

  7. #7

    Default Re: ssh - no known_hosts file

    Bev A. Kupf wrote: 
    >
    >
    > cd is a shell builtin. sudo is not a shell.
    >

    >
    >
    > Very clearly.[/ref]

    An edifying response. Thanks. Reminiscent of PC forums. Do you actually
    have any advice or do you just want to appear knowledgeable?

    nospamatall Guest

  8. #8

    Default Re: ssh - no known_hosts file

    Tom Stiller wrote:
     
    Ok, I edited cshrc to read source /bin/init.csh
    (it was /sw)
    but what should init.csh say? There presently isn't one and I can find
    no other example of that on disk, and no ref to init.csh in the man pages.

    <snip> 
    >
    >
    > It really sounds like thing got ed up with the CCC copy.
    >[/ref]

    I think I'll just leave it till a new installation time, or when there
    isn't any crucial work going on so I can risk ing everything up and
    have time to learn and work it out. It all still works.

    thanks.

    It's strange though, I thought ssh came with OS X and all the fink stuff
    was self-contained in /sw. Why would ssh go there unless I told it to?
    Shouldn't it go to /bin rather than sw/bin?
    nospamatall Guest

  9. #9

    Default Re: ssh - no known_hosts file

    On Sat, 17 Apr 2004 19:35:47 +0100,
    nospamatall (net) wrote: 
    >
    > An edifying response.[/ref]

    You're welcome. You apparently missed the portion
    of my response which explained why "sudo cd" will not
    work. The rest of the problems with your Mac are caused
    by your own inaneness.

    --
    Bev A. Kupf
    "The lyfe so short, the craft so long to lerne" -- Chaucer
    England go three up at Bridgetown!
    Bev Guest

  10. #10

    Default Re: ssh - no known_hosts file

    In article <ash.giganews.com>,
    Tom Stiller <net> wrote:
     [/ref]

    [...]
     
    > >
    > > Ok, I found it, but couldn't access it,
    > > even with sudo:
    > > sudo: cd: command not found[/ref]
    >
    > Since 'cd' is a shell command, it can't be executed with 'sudo'; you'll
    > have do do something like 'sudo sh' to start a root shell first, then
    > examine and repair '~/.sh'.[/ref]

    Or realize there's no need to be in a directory to work with it; 'work
    from afar': "sudo ls -l ~/.ssh"

    --
    Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>

    Mac user: "Macs only have 40 viruses, tops!"
    PC user: "SEE! Not even the virus writers support Macs!"
    Sander Guest

  11. #11

    Default Re: ssh - no known_hosts file

    Bev A. Kupf wrote: 
    >>
    >>An edifying response.[/ref]
    >
    >
    > You're welcome. You apparently missed the portion
    > of my response which explained why "sudo cd" will not
    > work. The rest of the problems with your Mac are caused
    > by your own inaneness.
    >[/ref]

    As you so glibly pointed out in your previous post.

    And don't edit my quotes to look like I responded to something other
    than what I did. thank god for the killfile feature. bye
    nospamatall Guest

Similar Threads

  1. problem in binding xml file data to datagrid xml file isgenerated through JSP file
    By ckshah in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: May 26th, 03:55 PM
  2. File Viewer / Bloated file sizes / What is the best file format?
    By Martin_Folley@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 1
    Last Post: June 27th, 05:24 PM
  3. Open file, make changes, save file, close, re-open, file contents not changed
    By brock@bergdesign.com in forum Adobe Illustrator Macintosh
    Replies: 7
    Last Post: March 7th, 07:29 PM
  4. Replies: 7
    Last Post: November 27th, 04:52 PM
  5. Replies: 8
    Last Post: July 26th, 04:02 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139