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

ssh #282

Closed
mikysal78 opened this issue May 1, 2019 · 5 comments
Closed

ssh #282

mikysal78 opened this issue May 1, 2019 · 5 comments

Comments

@mikysal78
Copy link

howto for create file authorized_keys for root?
howto change default port ssh?

@XECDesign
Copy link
Member

@mikysal78
Copy link
Author

You can install files like I do here - https://github.com/RPi-Distro/pi-gen/blob/master/stage2/01-sys-tweaks/01-run.sh

ok, but create in the home FIRST_USER dir .ssh with root don'user.
Because?
install -d "${ROOTFS_DIR}/home/ninux/.ssh"
install -d "${ROOTFS_DIR}/root/.ssh"
install -m 600 files/authorized_keys2 "${ROOTFS_DIR}/home/ninux/.ssh/"
install -m 600 files/authorized_keys2 "${ROOTFS_DIR}/root/.ssh/"

And you can drop in patches, like you see here - https://github.com/RPi-Distro/pi-gen/tree/master/stage2/01-sys-tweaks/00-patches

this is ok for chage default port on ssh

Thanks.

@XECDesign
Copy link
Member

ok, but create in the home FIRST_USER dir .ssh with root don'user.
Because?

Pardon?

@mikysal78
Copy link
Author

ninux@ninuxberry:~ $ ls -la
totale 24
drwxr-xr-x 3 ninux ninux 4096 mag 1 16:39 .
drwxr-xr-x 3 root root 4096 mag 1 16:23 ..
-rw-r--r-- 1 ninux ninux 220 mag 1 16:23 .bash_logout
-rw-r--r-- 1 ninux ninux 3523 mag 1 16:23 .bashrc
-rw-r--r-- 1 ninux ninux 675 mag 1 16:23 .profile
drwxr-xr-x 2 root root 4096 mag 1 16:39 .ssh
ninux@ninuxberry:~ $

@XECDesign
Copy link
Member

You can specify the permissions/ownership you want - https://github.com/RPi-Distro/pi-gen/blob/master/stage4/03-magpi/00-run.sh#L14

man install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants