SSH certificate authentication for the user without home directory

solarissshunix

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?

Best Answer

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.