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: handshake failed: EOF #315

Open
c7e715d1b04b17683718fb1e8944cc28 opened this issue Apr 12, 2024 · 5 comments
Open

ssh: handshake failed: EOF #315

c7e715d1b04b17683718fb1e8944cc28 opened this issue Apr 12, 2024 · 5 comments

Comments

@c7e715d1b04b17683718fb1e8944cc28

I am using the master branch, but I cannot SSH because of an error.

@appleboy
Copy link
Owner

appleboy commented Jun 4, 2024

Please provide the following information.

  1. Your hosting provider information, such as DigitalOcean, Linode, AWS, or GCP.
  2. The version information of your host's SSH service.
  3. The information from your host's SSH configuration file.

@c7e715d1b04b17683718fb1e8944cc28
Copy link
Author

1, https://www.shin-server.jp/
2, OpenSSH_8.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021
3, I cannot access the SSH configuration file because I do not have root privileges on the server.

Instead, I can give you the SSH connection password.

@ryoyamaz
Copy link

ryoyamaz commented Sep 5, 2024

Similar problems encountered. In my case, it was due to the SSH settings on the rental server. Due to security enhancements on the rental server side, SSH had been changed to ‘only allow access from within the country’, so I changed it back to ‘allow access from outside the country’ and solved the problem.

@menadio
Copy link

menadio commented Oct 6, 2024

Please provide the following information.

  1. Your hosting provider information, such as DigitalOcean, Linode, AWS, or GCP.
  2. The version information of your host's SSH service.
  3. The information from your host's SSH configuration file.

I am currently facing the same issue

Hosting
Digitalocean

SSH version
OpenSSH_9.6p1 Ubuntu-3ubuntu13.4, OpenSSL 3.0.13 30 Jan 2024

SSH configuration

Include /etc/ssh/ssh_config.d/*.conf

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP no
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,[email protected]
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
#   UserKnownHostsFile ~/.ssh/known_hosts.d/%k
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    CASignatureAlgorithms +ssh-rsa

A bit of context, I am using ed25519 generated on my local machine and I added the public key to the Digitalocean ubuntu serve ~/.ssh/authorized_keys. I also added the private key to github secrets and below is my workflow

name: Staging Deployment

run-name: Code deployment to staging by ${{ github.actor }}

on:
  push:
    branches:
      - staging

jobs:
  staging-deployment:
    name: Continuous deployment

    runs-on: ubuntu-latest

    steps:
      - name: Checkout code from repository
        uses: actions/checkout@v3

      - name: Deploy code to server
        uses: appleboy/[email protected]
        with:
          host: ${{ secrets.HOST }}
          username: ${{ secrets.USERNAME }}
          key: ${{ secrets.SSH_PRIVATE_KEY }}
          port: ${{ secrets.PORT }}
          script: |
            whoami

@mxknt
Copy link

mxknt commented Oct 31, 2024

I'm having the same issue as @menadio, also on a DigitalOcean VM.
Scratch that, I had the username set incorrectly, appears to be working now.

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

5 participants