Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
yes ok, i get the passphrase stuff... not a problem.
1) you put the client private key onto the server, as that's the way that you make the connection. the server must know about the client, not the other way round.
2) nothing needs to be restarted, this is something that totally unpriveledged users can do totally safely.
Lets say I'm logged in at "bob" and I run a program, that needs to copy a file over to anohter server. In the script it goes over and tries to login as "tom" and puts the file in a directory over there.
Do I create the key as bob, and copy it over to tom?
I'm really feeling lost on this.
I've gotten this to work before, when it was straight forward, e.g. just using passphrases. This, I can't seem to grasp.
the logins are typically on a per user basis at the most granular level. if user a on the client copies their key to user b's key file on the server then you will be able to log in automatically whilst changing username.
I created a key combo on the client machine. I created it under root, as that is the user we use to run this particular script. Installed the key pair under the default /root/.ssh/
The client we are on is linux, and the server we are trying to get on , is solaris.
On the solaris machine, there isnt a /root directory, but it looks like roots home is / I typed cd and then did a pwd to figure this out.
So I put the public key under /.ssh and just for the hell of it, i put it under the user we are going into this machine as /users/charlie/.ssh
Here's the sshd config file from the solaris machine. *I only put the stuff that's not commented*
port 22
StrictModes no
UserConfigDirectory "%D/.ssh"
AuthorizationFile authorization
AllowTcpForwarding yes
AllowX11Forwarding yes
AlloweedAuthentications publickey,password
allowUsers charlie *theres more but not needed here*
PermitRootLogin no
DSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/id_dsa.pub
I have no idea what else to put, or if i have something wrong in here.
i don't understand why this is so tricky... why have you changed the AuthorizedKeysFile values? why are you copying the public key anywhere? that's the bit that the client gives the server on login. the server needs the private keys, as the documentation states.
and as an aside... have you not noticed the little line there that says "PermitRootLogin no" ? leave it there and use a non-root user for this function.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.