Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ssh key of gislab user to gislab client #487

Open
lfurtkevicova opened this issue Feb 19, 2016 · 10 comments
Open

Add ssh key of gislab user to gislab client #487

lfurtkevicova opened this issue Feb 19, 2016 · 10 comments

Comments

@lfurtkevicova
Copy link
Collaborator

Currently it is not possible to log in to the gislab client from the server by ssh.

@landam
Copy link
Collaborator

landam commented Feb 19, 2016

Confirmed, currently I am bypassing it by special user after-add hook.

@imincik
Copy link
Collaborator

imincik commented Feb 19, 2016

I don't understand this issue. Can you explain this issue in detail ?

@landam
Copy link
Collaborator

landam commented Feb 19, 2016

You cannot connect from the server to the running client:

ssh gislab@c50

says 'Error: Permission denied (publickey)'.

@imincik
Copy link
Collaborator

imincik commented Feb 19, 2016

It is true, only SSH keys authentication is allowed. Do you propose creating some password-less SSH keys on user account creation ?

@landam
Copy link
Collaborator

landam commented Feb 19, 2016

Yes, the gislab user should be definitely able to access running clients. Something like

mkdir /mnt/home/${GISLAB_USER}/.ssh
cp /mnt/home/gislab/.ssh/id_dsa.pub /mnt/home/${GISLAB_USER}/.ssh/authorized_keys
chown ${GISLAB_USER}:gislabusers /mnt/home/${GISLAB_USER}/.ssh/ -R

@imincik
Copy link
Collaborator

imincik commented Feb 19, 2016

'gislab' user account doesn't contain private or public SSH key.

But it contains public key used for provisioning user (ubuntu or vagrant). So adding this key to ssh-agent ($ ssh-add ) and logging with agent forwarding enabled ($ ssh -A) should allow logging to server and jumping to clients as well.

@imincik
Copy link
Collaborator

imincik commented Feb 19, 2016

Run "$ vagrant ssh-config" to get SSH connection information used by Vagrant which contains also path to SSH key used by Vagrant

@landam
Copy link
Collaborator

landam commented Feb 19, 2016

I don't understand, there is no vagrant used/installed on GIS.lab unit, right?

@imincik
Copy link
Collaborator

imincik commented Feb 19, 2016

@landam, I meant that every user account used for GIS.lab installation ('vagrant' if using Vagrant, 'ubuntu' for other installations) contains public SSH key. For GIS.lab Unit, it is the one which is specified during basic OS ISO image creation. This key is copied during installation also to 'gislab' user account (see: /storage/home/gislab/.ssh/authorized_keys). Therefore, you can use this SSH key for connection. See ssh-agent for more information how to forward SSH keys.

@landam
Copy link
Collaborator

landam commented Feb 26, 2016

OK, but I still think that gislab user should be able to connect from the server to the clients out of box (without any extra effort).

ssh gislab@c50

@landam landam removed this from the version 1.0 milestone Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants