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

centos ssh not working ... (Starting extra/ssh ... fail) #972

Closed
tyq0010 opened this issue Jun 28, 2018 · 3 comments
Closed

centos ssh not working ... (Starting extra/ssh ... fail) #972

tyq0010 opened this issue Jun 28, 2018 · 3 comments

Comments

@tyq0010
Copy link

tyq0010 commented Jun 28, 2018

I installed centos 7 (aarch64), Then, after I started it, I get this :

[11:26:10] >>> start
[11:26:10] Checking file system ... skip
[11:26:10] Mounting the container: 
[11:26:10] / ... skip
[11:26:10] /proc ... skip
[11:26:10] /sys ... skip
[11:26:10] /dev ... skip
[11:26:10] /dev/shm ... skip
[11:26:10] /dev/pts ... skip
[11:26:10] :: Configuring core/mnt ... 
[11:26:10] :: Configuring core/net ... 
[11:26:10] :: Starting extra/ssh ... fail
[11:26:10] <<< start

The debug log shown below:

----------------------------------------------------------------
[11:28:25] + COMPONENT_DIR=/data/user/0/ru.meefik.linuxdeploy/env/include/extra/ssh
[11:28:25] + '[' -d /data/user/0/ru.meefik.linuxdeploy/env/include/extra/ssh ]
[11:28:25] + unset NAME DESC TARGET PARAMS DEPENDS EXTENDS
[11:28:25] + TARGET='*:*:*'
[11:28:25] + . /data/user/0/ru.meefik.linuxdeploy/env/include/extra/ssh/deploy.conf
[11:28:25] + NAME=ssh
[11:28:25] + DESC='Secure shell (SSH) server'
[11:28:25] + PARAMS=DISTRIB
[11:28:25] + DEPENDS=extra
[11:28:25] + '[' -e /data/user/0/ru.meefik.linuxdeploy/env/include/extra/ssh/deploy.sh ]
[11:28:25] + . /data/user/0/ru.meefik.linuxdeploy/env/include/extra/ssh/deploy.sh
[11:28:25] + '[' -n 22 ]
[11:28:25] + component_is_exclude extra/ssh
[11:28:25] + local 'component=extra/ssh'
[11:28:25] + '[' -n extra/ssh ]
[11:28:25] + return 1
[11:28:25] + '[' false '!=' true ]
[11:28:25] + params_check DISTRIB
[11:28:25] + local 'params_list=DISTRIB'
[11:28:25] + local key val params_lost
[11:28:25] + eval 'val=$DISTRIB'
[11:28:25] + val=centos
[11:28:25] + '[' -z centos ]
[11:28:25] + '[' -n  ]
[11:28:25] + return 0
[11:28:25] + '[' true '=' true ]
[11:28:25] ## extra/ssh : do_start
[11:28:25] + msg '## extra/ssh : do_start'
[11:28:25] + echo '## extra/ssh : do_start'
[11:28:25] + set +e
[11:28:25] + eval do_start
[11:28:25] + do_start
[11:28:25] + msg -n ':: Starting extra/ssh ... '
[11:28:25] + echo -n:: Starting extra/ssh ...  ':: Starting extra/ssh ... '
[11:28:25] + is_stopped /var/run/sshd.pid /run/sshd.pid
[11:28:25] + is_started /var/run/sshd.pid /run/sshd.pid
[11:28:25] + get_pids /var/run/sshd.pid /run/sshd.pid
[11:28:25] + local pid pidfile pids
[11:28:25] + pidfile=/data/local/mnt/var/run/sshd.pid
[11:28:25] + '[' -e /data/local/mnt/var/run/sshd.pid ]
[11:28:25] + '[' -e /proc//var/run/sshd.pid ]
[11:28:25] + pidfile=/data/local/mnt/run/sshd.pid
[11:28:25] + '[' -e /data/local/mnt/run/sshd.pid ]
[11:28:25] + '[' -e /proc//run/sshd.pid ]
[11:28:25] + '[' -n  ]
[11:28:25] + return 1
[11:28:25] + test 1 -ne 0
[11:28:25] + is_ok skip
[11:28:25] + '[' 0 -eq 0 ]
[11:28:25] + '[' -n  ]
[11:28:25] + return 0
[11:28:25] + make_dirs /run/sshd /var/run/sshd
[11:28:25] + local item target
[11:28:25] + target=/data/local/mnt/run/sshd
[11:28:25] + '[' -d /data/local/mnt/run -a '!' -d /data/local/mnt/run/sshd ]
[11:28:25] + target=/data/local/mnt/var/run/sshd
[11:28:25] + '[' -d /data/local/mnt/var/run -a '!' -d /data/local/mnt/var/run/sshd ]
[11:28:25] + return 0
[11:28:25] + + ls /data/local/mnt/etc/ssh/
[11:28:25] grep -c keyls: /data/local/mnt/etc/ssh/: No such file or directory
[11:28:25] 
[11:28:25] + '[' 0 -eq 0 ]
[11:28:25] + chroot_exec -u root ssh-keygen -A
[11:28:25] + unset TMP TEMP TMPDIR LD_PRELOAD LD_DEBUG
[11:28:25] + local 'path=/system/xbin:/data/user/0/ru.meefik.linuxdeploy/bin:/data/user/0/ru.meefik.linuxdeploy/bin:/su/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/su/xbin:/system/xbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
[11:28:25] + '[' -u '=' -u ]
[11:28:25] + local 'username=root'
[11:28:25] + shift 2
[11:28:25] + '[' -n root ]
[11:28:25] + '[' 2 -gt 0 ]
[11:28:25] + chroot /data/local/mnt /bin/su - root -c 'ssh-keygen -A'
[11:28:25] -bash: ssh-keygen: command not found
[11:28:25] + '[' chroot '=' proot ]
[11:28:25] + chroot_exec -u root /usr/sbin/sshd -p 22
[11:28:25] + unset TMP TEMP TMPDIR LD_PRELOAD LD_DEBUG
[11:28:25] + local 'path=/system/xbin:/data/user/0/ru.meefik.linuxdeploy/bin:/data/user/0/ru.meefik.linuxdeploy/bin:/su/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/su/xbin:/system/xbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
[11:28:25] + '[' -u '=' -u ]
[11:28:25] + local 'username=root'
[11:28:25] + shift 2
[11:28:25] + '[' -n root ]
[11:28:25] + '[' 3 -gt 0 ]
[11:28:25] + chroot /data/local/mnt /bin/su - root -c '/usr/sbin/sshd -p 22'
[11:28:25] -bash: /usr/sbin/sshd: No such file or directory
[11:28:25] + is_ok fail 'done'fail
[11:28:25] 
[11:28:25] + '[' 127 -eq 0 ]
[11:28:25] + '[' -n fail ]
[11:28:25] + msg fail
[11:28:25] + echo fail
[11:28:25] + return 1
[11:28:25] + return 0
[11:28:25] + set -e
[11:28:25] + exit 0
[11:28:25] + is_ok
[11:28:25] + '[' 0 -eq 0 ]
[11:28:25] + '[' -n  ]
[11:28:25] + return 0
[11:28:25] + printf $'<<< start\n'
[11:28:25] <<< start
[11:28:25] + exit 0
----------------------------------------------------------------

I tried installing Arch Linux (aarch64), It work well. but centos doesn't.

@whoamiTM
Copy link

whoamiTM commented Jul 22, 2018

Same issue here... I tried using a different mirror for CentOS but it didn't help. But like you said, I install Debian and ssh starts right up. It seems that CentOS 7 is missing some packages...

Ok I got SSH to work... I had to use terminal emulator... First i had to yum-config-manager --disable centos-kernel because something is wrong with that repo, then yum upgrade then
yum install openssh openssh-server openssh-clients openssl-libs then yum install liblz4.so.1

Then start the service by exiting out of terminal emulator and starting the container through Linux Deploy.

service sshd restart wont work in chroot

CentOS 7 has some kind of issue with the centos-kernel repo and was missing openssh-server and liblz4.so.1

You can close this issue

@meefik
Copy link
Owner

meefik commented Aug 22, 2018

Fixed in v2.1.1-240

@meefik meefik closed this as completed Aug 22, 2018
@rohand2290
Copy link

I have this same issue on v.2.5.1. SSH refuses to start. What do I do? This is armhfp by the way. CentOS 7

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

4 participants