ssh-action: i/o timeout

i can’t connect to my server. having dial tcp ***:22: i/o timeout error

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (2 by maintainers)

Commits related to this issue

Most upvoted comments

In my case, it was a conflict because I was declaring PORT env var for the Node app, while this was affecting the ssh-action.

env:
  PORT: 8000

The solution was to rename the variable from PORT to APP_PORT.

We just had this error and it was caused by the server IP changed but the old IP was hardcoded into GitHub actions.

In my case, it was a conflict because I was declaring to use it for the Node app, while this was affecting the ssh-action.

env:
  PORT: 8000

The solution was to rename the variable from PORT to APP_PORT.

You saved my day! Thank you:)

I have the same issue. This is my job.

    name: Deploy and Run Docker Container
    uses: appleboy/ssh-action@v1.0.3
    with:
      host: ${{ secrets.SSH_HOST }}
      username: ${{ secrets.SSH_USERNAME }}
      key: ${{ secrets.SSH_PRIVATE_KEY }}
      passphrase: ${{ secrets.PASSPHRASE }}

And the error remains the same: ======END====== 2024/03/29 04:05:00 dial tcp ***:22: i/o timeout

I’m not sure if it’s related to the port, but I don’t see why it would be. I’m trying to access a server that belongs to me. II have one last question, in the SSH_KEY should I put the private key I have on my server, right?

We just had this error and it was caused by the server IP changed but the old IP was hardcoded into GitHub actions. I had the same issue, thank you very much

Please see the document https://github.com/appleboy/ssh-action#setting-up-ssh-key before using the plugin.