Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have access to Solaris box over ssh and can login with username and password. I want to write a script which would copy files from that box unattended (scp/sftp from cron). Usually in such case I set up certificate authentication w/o password, but the problem is that my account on that box doesn't have home directory. I don't have a root access and can't change sshd config. Is there any way I can set up certificate authentication in such case? In other words, is there a way to let sshd to use public from location other than ~/.ssh/authrorized_keys?

Alternatively, if the above is not possible, is there other way to set up scp/sftp to run without user input with password based authentication?

share|improve this question
up vote 2 down vote accepted

No, unless the Solaris box in question have been setup in a rather exotic/strange way there are no way for you to specify a public key to use.

Assuming we are talking about the usual scp client, which is part of OpenSSH, it in itself won't accept a password non-interactively.

One solution might be to write your own scp "client". That is, put something together in your favorite scripting language, using a suitable module/library, allowing the password to be inserted non-interactively.

share|improve this answer

Not if you cannot change /etc/sshd/sshd_config.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.