Cannot chmod neither .ssh nor authorized_keys

Hello all:

Doing this in two Ubuntu 10.4 LTS nodes.

Loosing my mind here. Not sure what is happening, but here is the issue:

I am trying to simply set up the standard SSH login from one node to another. (generating keys in one node, copy them over to 2nd node so they can be used by node #1 to login without a password). This is for an aegir set up, which all it means is I must generate this keys as a user ("aegir" user must be used) at both machines.

1) On Node #1 I create the dsa keys as an "aegir" user . No problem.

2) I then copy them over to node #2 in its /tmp folder. No problem.

3) On node #2 I generate the .ssh folder by creating the dsa keys as an "aegir", just like in node #1. This is to ensure .ssh is identical, though I will not be using the keys made. This is JUST to generate the .ssh folder. That is all. No problem.

Now, this is where it gets really bizarre:

4) There is no "authorized_keys" in the node #2 "aegir' user .ssh folder, so i switch over to "aegir" (su aegir) and do a simple touch

touch authorized_keys

But when I do this and then check via ls -l, authorized-keys shows up like this:

-rw------- 1 aegir aegir   0 Oct 25 08:05 authorized_keys

Ok, so then I say "let's chmod this file to its correct settings"

I go into .ssh and execute the chmod:

chmod 600 authorized_keys

I check again with ls -l

-rw------- 1 aegir aegir   0 Oct 25 08:05 authorized_keys

No change. I do this as root or as "aegir" user (with and without sudo), no change:

-rw------- 1 aegir aegir   0 Oct 25 08:05 authorized_keys

Furthermore, I also cannot chmod the .ssh directory itself.

8 hours trying and no luck.

What on earth is going on? Anybody? I beg for ANy help, hint, lead to a solution. Driving me nuts.

Thanks

5 Replies

Yes, that is what I am trying to do. The problem is…I can't.

Thanks all the same.

@kannary100:

Yes, that is what I am trying to do. The problem is…I can't.

Could you clarify what you're trying to do?

Everything you've done seems to be working exactly as expected. As Stever pointed out, "-rw–----- == 600". The permissions in your chmod match the permissions that 'ls -l' is showing.

jsmith@undertow:~/test$ touch file jsmith@undertow:~/test$ ls -l file -rw-r--r-- 1 jsmith jsmith 0 2010-10-25 14:51 file jsmith@undertow:~/test$ chmod 600 file jsmith@undertow:~/test$ ls -l file -rw------- 1 jsmith jsmith 0 2010-10-25 14:51 file jsmith@undertow:~/test$ stat file ... Access: (0600/-rw-------) Uid: ( 1000/ jsmith) Gid: ( 1000/ jsmith) ... I'm not sure what the problem is. You are setting the file to 600. Were you expecting something different?

The sad thing is that people like that now have multiple servers with gigabit links to the internet.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct