OpenSSH Server won't start on orangepi/linux












3















I am currently doing some testing with an Orange Pi. After doing an update on a fresh install it seems as though the ssh server is no longer able to start itself, and I'm not able to manually start it either. Purging and reinstalling openssh-server still leaves me with the same error after reinstall



Error:



setting up openssh-server (1:7.2p2-4ubuntu2.6) ...
Failed to validate path /var/run/sshd: Bad file descriptor
Job for ssh.service failed because the control process exited with error
code. See "systemctl status ssh.service" and "journalctl -xe" for details.
invoke-rc.d: initscript ssh, action "start" failed.
ssh.service - OpenBSD Secure Shell Server
loaded: loaded (/lib/systemd/system/ssh.service; enabled;vendor preset: enabled)
Active: activating (auto-restart) (result: exit code) since WED 2018-11-21 11:01:38; 59ms ago
Process: 6423 ExecStartPre=/usr/bin/sshd -t (code=exited, status=255)
Failed to start OpenBSD Secure Shell....
ssh.service: Unit Entered Failed state.
ssh.service: Failed with result 'exit code'
dpkg: error processing package openssh-server (--configure):
sub-process installed post-installation script returned aroor exit status 1
errors were encountered while processing: openssh-server


ssh.conf :



# ssh - OpenBSD Secure Shell server
#
# The OpenSSH server provides secure shell access to the system.

description "OpenSSH server"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5
umask 022

env SSH_SIGSTOP=1
expect stop

# 'sshd -D' leaks stderr and confuses things in conjunction with 'console
log'
console none

pre-start script
test -x /usr/sbin/sshd || { stop; exit 0; }
test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }

mkdir -p -m0755 /var/run/sshd
end script

# if you used to set SSHD_OPTS in /etc/default/ssh, you can change the
# 'exec' line here instead
exec /usr/sbin/sshd -D


for whatever reason the config file isn't making the directory










share|improve this question
















bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Add the contents of /etc/init/ssh.conf to your question.

    – Nasir Riley
    Nov 22 '18 at 3:10











  • The message complains about /var/run/sshd. Does this path exist? Did you make changes to the distribution-provided setup or config?

    – Kusalananda
    Nov 22 '18 at 6:55
















3















I am currently doing some testing with an Orange Pi. After doing an update on a fresh install it seems as though the ssh server is no longer able to start itself, and I'm not able to manually start it either. Purging and reinstalling openssh-server still leaves me with the same error after reinstall



Error:



setting up openssh-server (1:7.2p2-4ubuntu2.6) ...
Failed to validate path /var/run/sshd: Bad file descriptor
Job for ssh.service failed because the control process exited with error
code. See "systemctl status ssh.service" and "journalctl -xe" for details.
invoke-rc.d: initscript ssh, action "start" failed.
ssh.service - OpenBSD Secure Shell Server
loaded: loaded (/lib/systemd/system/ssh.service; enabled;vendor preset: enabled)
Active: activating (auto-restart) (result: exit code) since WED 2018-11-21 11:01:38; 59ms ago
Process: 6423 ExecStartPre=/usr/bin/sshd -t (code=exited, status=255)
Failed to start OpenBSD Secure Shell....
ssh.service: Unit Entered Failed state.
ssh.service: Failed with result 'exit code'
dpkg: error processing package openssh-server (--configure):
sub-process installed post-installation script returned aroor exit status 1
errors were encountered while processing: openssh-server


ssh.conf :



# ssh - OpenBSD Secure Shell server
#
# The OpenSSH server provides secure shell access to the system.

description "OpenSSH server"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5
umask 022

env SSH_SIGSTOP=1
expect stop

# 'sshd -D' leaks stderr and confuses things in conjunction with 'console
log'
console none

pre-start script
test -x /usr/sbin/sshd || { stop; exit 0; }
test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }

mkdir -p -m0755 /var/run/sshd
end script

# if you used to set SSHD_OPTS in /etc/default/ssh, you can change the
# 'exec' line here instead
exec /usr/sbin/sshd -D


for whatever reason the config file isn't making the directory










share|improve this question
















bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Add the contents of /etc/init/ssh.conf to your question.

    – Nasir Riley
    Nov 22 '18 at 3:10











  • The message complains about /var/run/sshd. Does this path exist? Did you make changes to the distribution-provided setup or config?

    – Kusalananda
    Nov 22 '18 at 6:55














3












3








3








I am currently doing some testing with an Orange Pi. After doing an update on a fresh install it seems as though the ssh server is no longer able to start itself, and I'm not able to manually start it either. Purging and reinstalling openssh-server still leaves me with the same error after reinstall



Error:



setting up openssh-server (1:7.2p2-4ubuntu2.6) ...
Failed to validate path /var/run/sshd: Bad file descriptor
Job for ssh.service failed because the control process exited with error
code. See "systemctl status ssh.service" and "journalctl -xe" for details.
invoke-rc.d: initscript ssh, action "start" failed.
ssh.service - OpenBSD Secure Shell Server
loaded: loaded (/lib/systemd/system/ssh.service; enabled;vendor preset: enabled)
Active: activating (auto-restart) (result: exit code) since WED 2018-11-21 11:01:38; 59ms ago
Process: 6423 ExecStartPre=/usr/bin/sshd -t (code=exited, status=255)
Failed to start OpenBSD Secure Shell....
ssh.service: Unit Entered Failed state.
ssh.service: Failed with result 'exit code'
dpkg: error processing package openssh-server (--configure):
sub-process installed post-installation script returned aroor exit status 1
errors were encountered while processing: openssh-server


ssh.conf :



# ssh - OpenBSD Secure Shell server
#
# The OpenSSH server provides secure shell access to the system.

description "OpenSSH server"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5
umask 022

env SSH_SIGSTOP=1
expect stop

# 'sshd -D' leaks stderr and confuses things in conjunction with 'console
log'
console none

pre-start script
test -x /usr/sbin/sshd || { stop; exit 0; }
test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }

mkdir -p -m0755 /var/run/sshd
end script

# if you used to set SSHD_OPTS in /etc/default/ssh, you can change the
# 'exec' line here instead
exec /usr/sbin/sshd -D


for whatever reason the config file isn't making the directory










share|improve this question
















I am currently doing some testing with an Orange Pi. After doing an update on a fresh install it seems as though the ssh server is no longer able to start itself, and I'm not able to manually start it either. Purging and reinstalling openssh-server still leaves me with the same error after reinstall



Error:



setting up openssh-server (1:7.2p2-4ubuntu2.6) ...
Failed to validate path /var/run/sshd: Bad file descriptor
Job for ssh.service failed because the control process exited with error
code. See "systemctl status ssh.service" and "journalctl -xe" for details.
invoke-rc.d: initscript ssh, action "start" failed.
ssh.service - OpenBSD Secure Shell Server
loaded: loaded (/lib/systemd/system/ssh.service; enabled;vendor preset: enabled)
Active: activating (auto-restart) (result: exit code) since WED 2018-11-21 11:01:38; 59ms ago
Process: 6423 ExecStartPre=/usr/bin/sshd -t (code=exited, status=255)
Failed to start OpenBSD Secure Shell....
ssh.service: Unit Entered Failed state.
ssh.service: Failed with result 'exit code'
dpkg: error processing package openssh-server (--configure):
sub-process installed post-installation script returned aroor exit status 1
errors were encountered while processing: openssh-server


ssh.conf :



# ssh - OpenBSD Secure Shell server
#
# The OpenSSH server provides secure shell access to the system.

description "OpenSSH server"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5
umask 022

env SSH_SIGSTOP=1
expect stop

# 'sshd -D' leaks stderr and confuses things in conjunction with 'console
log'
console none

pre-start script
test -x /usr/sbin/sshd || { stop; exit 0; }
test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }

mkdir -p -m0755 /var/run/sshd
end script

# if you used to set SSHD_OPTS in /etc/default/ssh, you can change the
# 'exec' line here instead
exec /usr/sbin/sshd -D


for whatever reason the config file isn't making the directory







linux ssh networking dpkg openssh






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 15:04









agentzulu

31




31










asked Nov 22 '18 at 1:29









agentzuluagentzulu

162




162





bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Add the contents of /etc/init/ssh.conf to your question.

    – Nasir Riley
    Nov 22 '18 at 3:10











  • The message complains about /var/run/sshd. Does this path exist? Did you make changes to the distribution-provided setup or config?

    – Kusalananda
    Nov 22 '18 at 6:55



















  • Add the contents of /etc/init/ssh.conf to your question.

    – Nasir Riley
    Nov 22 '18 at 3:10











  • The message complains about /var/run/sshd. Does this path exist? Did you make changes to the distribution-provided setup or config?

    – Kusalananda
    Nov 22 '18 at 6:55

















Add the contents of /etc/init/ssh.conf to your question.

– Nasir Riley
Nov 22 '18 at 3:10





Add the contents of /etc/init/ssh.conf to your question.

– Nasir Riley
Nov 22 '18 at 3:10













The message complains about /var/run/sshd. Does this path exist? Did you make changes to the distribution-provided setup or config?

– Kusalananda
Nov 22 '18 at 6:55





The message complains about /var/run/sshd. Does this path exist? Did you make changes to the distribution-provided setup or config?

– Kusalananda
Nov 22 '18 at 6:55










1 Answer
1






active

oldest

votes


















1














Alright, I played around with it myself for a bit. It turns out that the filesystem likes to clean /var/run/sshd on boot. My fix for now is that I made a bash script to make that directory on boot and then start the ssh service. It seems to work right now although there probably was a faster way I'm just not familiar with.






share|improve this answer






















    protected by Community Nov 28 '18 at 0:43



    Thank you for your interest in this question.
    Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



    Would you like to answer one of these unanswered questions instead?














    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Alright, I played around with it myself for a bit. It turns out that the filesystem likes to clean /var/run/sshd on boot. My fix for now is that I made a bash script to make that directory on boot and then start the ssh service. It seems to work right now although there probably was a faster way I'm just not familiar with.






    share|improve this answer




























      1














      Alright, I played around with it myself for a bit. It turns out that the filesystem likes to clean /var/run/sshd on boot. My fix for now is that I made a bash script to make that directory on boot and then start the ssh service. It seems to work right now although there probably was a faster way I'm just not familiar with.






      share|improve this answer


























        1












        1








        1







        Alright, I played around with it myself for a bit. It turns out that the filesystem likes to clean /var/run/sshd on boot. My fix for now is that I made a bash script to make that directory on boot and then start the ssh service. It seems to work right now although there probably was a faster way I'm just not familiar with.






        share|improve this answer













        Alright, I played around with it myself for a bit. It turns out that the filesystem likes to clean /var/run/sshd on boot. My fix for now is that I made a bash script to make that directory on boot and then start the ssh service. It seems to work right now although there probably was a faster way I'm just not familiar with.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 '18 at 14:20









        agentzuluagentzulu

        111




        111

















            protected by Community Nov 28 '18 at 0:43



            Thank you for your interest in this question.
            Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



            Would you like to answer one of these unanswered questions instead?



            Popular posts from this blog

            CARDNET

            Boot-repair Failure: Unable to locate package grub-common:i386

            Aws NAT - Aws IGW- Aws router