OpenSSH Server won't start on orangepi/linux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












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









New contributor




agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Add the contents of /etc/init/ssh.conf to your question.
    – Nasir Riley
    Nov 22 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 at 6:55














up vote
2
down vote

favorite












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









New contributor




agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Add the contents of /etc/init/ssh.conf to your question.
    – Nasir Riley
    Nov 22 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 at 6:55












up vote
2
down vote

favorite









up vote
2
down vote

favorite











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









New contributor




agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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









New contributor




agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 22 at 15:04









agentzulu

31




31






New contributor




agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 22 at 1:29









agentzulu

111




111




New contributor




agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Add the contents of /etc/init/ssh.conf to your question.
    – Nasir Riley
    Nov 22 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 at 6:55
















  • Add the contents of /etc/init/ssh.conf to your question.
    – Nasir Riley
    Nov 22 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 at 6:55















Add the contents of /etc/init/ssh.conf to your question.
– Nasir Riley
Nov 22 at 3:10




Add the contents of /etc/init/ssh.conf to your question.
– Nasir Riley
Nov 22 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 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 at 6:55










1 Answer
1






active

oldest

votes

















up vote
0
down vote













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








New contributor




agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















    protected by Community 23 hours ago



    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








    up vote
    0
    down vote













    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








    New contributor




    agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote













      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








      New contributor




      agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



















        up vote
        0
        down vote










        up vote
        0
        down vote









        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








        New contributor




        agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        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








        New contributor




        agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Nov 22 at 14:20









        agentzulu

        1




        1




        New contributor




        agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        agentzulu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.















            protected by Community 23 hours ago



            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

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay