ssh script returns 255 error

前端 未结 8 805
北海茫月
北海茫月 2020-12-08 04:04

In my code I have the following to run a remote script.

ssh root@host.domain.com \"sh /home/user/backup_mysql.sh\"

For some reason it keeps

8条回答
  •  暖寄归人
    2020-12-08 04:59

    SSH Very critical issue on Production. SSH-debug1: Exit status 255

    I was working with Live Server and lots stuff stuck. I try many things to fix but exact issue of 255 don't figure out.

    Even I had resolved issue 100%

    Replace my sshd_config file from similar other my debian server

    root@snippetbucket.com:~# cp sshd_config sshd_config.snippetbucket.com.bkp #keep my backup file

    root@snippetbucket.com:~# echo "" > sshd_config

    root@snippetbucket.com:~# nano sshd_config #replaced all content with other exact same server

    root@snippetbucket.com:~# sudo service ssh restart #normally restart server

    That's 100% resolve my issue immediate.

    #SnippetBucket-Tip: Always take backup of ssh related files, which help on quick restoration.

    Note: After apply given changes you need to exit rescue mode and reboot your vps / dedicated server normally, than your ssh connection works.

    During rescue mode ssh don't allow user to login as normally. only rescue ssh related login and password works.

提交回复
热议问题