2

I'm writing a lil' bash script to update files on a webserver from any authorized computer. In the end, I want to use the scp command to do the work.

scp -i ~/.ssh/id_rsa $localpath [email protected]:$webpath

The webserver is on an AFS, so dropping the public key into ~/.ssh/authenticated_keys doesn't cut it, as you need a token to access that. One workaround, as described in [1],"is to place private keys into ~/.ssh-private and place public keys into ~/.ssh/authorized_keys. The access to ~/.ssh-private is closed off to everyone but the user, while the access to ~/.ssh is opened up to unauthenticated users."

I'd love to do this, but I'm not the network admin. I can ssh 'manually' by supplying the password. Is there a way for me to figure out how it's been arranged? How is it usually done?

I found a Kerberos/AFS patch for ssh, but don't want to dive into it until I get some feedback. (I'd likely just break my OSX ssh command!)

[1] cs.unc.edu/cgi-bin/howto?howto=ssh-keys (Sorry about the link -- I'm only allowed to make one active.)

1 Answer 1

1

Why would you need to be root to place files in ~ (e.g. via scp)?

For the confused there is always ssh-copy-id. To install your public key from your local machine you would

# ssh-copy-id [email protected]

This will automagically guess your which key to install. For everything else have a look at the manpage.

2
  • "$user" doesn't have root permissions. I talked to the IT guys that manage the server -- they haven't made provisions for any workaround and couldn't think of any, so I buggered off.
    – tyblu
    Jan 24, 2010 at 0:53
  • @tyblu did you try ssh-copy-id? If I understand you correctly, you don't need root to set this up. Jan 24, 2010 at 1:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .