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

i/o timeout #32

Closed
adm-dev opened this issue Feb 12, 2020 · 16 comments
Closed

i/o timeout #32

adm-dev opened this issue Feb 12, 2020 · 16 comments

Comments

@adm-dev
Copy link

adm-dev commented Feb 12, 2020

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

@adm-dev adm-dev closed this as completed Feb 12, 2020
@izshreyansh
Copy link

Can you share how did you solve it? @adm-dev

@nwesber
Copy link

nwesber commented Aug 25, 2020

Hi @izshreyansh,

I solved the problem by adding correct keys in both my repository and server for proper exchange.

@appleboy
Copy link
Owner

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

This was referenced Aug 25, 2020
@GarryOne
Copy link

GarryOne commented Jul 14, 2022

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.

@agm1984
Copy link

agm1984 commented Sep 1, 2022

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

@kadriev-ilyas
Copy link

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:)

@ralyodio
Copy link

ralyodio commented Feb 8, 2023

adding debug: true doesn't do anything. I'm also getting timeout error. rsync works fine but ssh-action module does not connect using same params.

@GarryOne
Copy link

adding debug: true doesn't do anything. I'm also getting timeout error. rsync works fine but ssh-action module does not connect using same params.

You can temporarily fork the repository, use your version and add more logging for debugging it easier. I did the same.

@SainyTK
Copy link

SainyTK commented Feb 18, 2023

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.

Save my day !!!!

@PajaroConnect2BPO
Copy link

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

appleboy added a commit to appleboy/drone-ssh that referenced this issue Apr 13, 2023
- Modify the `EnvVars` slice to include `INPUT_` prefix when needed
- Remove unused environment variables from the `EnvVars` slice
- Update the `EnvVars` slice to include `PROXY_` prefix when needed
- Modify the `EnvVars` slice to include `PLUGIN_SSH_CIPHERS` as `PROXY_SSH_CIPHERS`
- Modify the `EnvVars` slice to include `PLUGIN_PROXY_USE_INSECURE_CIPHER` as `PROXY_SSH_USE_INSECURE_CIPHER`
- Modify the `EnvVars` slice to include `PLUGIN_PROXY_FINGERPRINT` as `PROXY_SSH_FINGERPRINT`
- Remove the environment variable `PROXY_HOST`
- Modify the `EnvVars` slice to include `PLUGIN_DEBUG` as `INPUT_DEBUG`

* appleboy/ssh-action#53 (comment)
* appleboy/ssh-action#32 (comment)
* appleboy/ssh-action#213
@nelajc
Copy link

nelajc commented Feb 1, 2024

@appleboy isn't this issue regarding server security group limited to specific IPs ? for example our server can only access using our ip address. if so can help which ip ranges should i whitelist to our server? thanks

======CMD======
sudo docker ps
======END======
2024/01/31 10:58:54 dial tcp ***:22: i/o timeout

here's my workflow:

uses: appleboy/[email protected]
      with:
        host: ${{ secrets.SSH_HOST }}
        username: ${{ secrets.SSH_USER }}
        key: ${{ secrets.SSH_PRIVATE_KEY }}
        script: |
           sudo docker ps

@appleboy
Copy link
Owner

appleboy commented Feb 1, 2024

@SafwatImran
Copy link

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.

Thanks a lot! This worked for me after hours of trying to debug the issue!

@superpollo2
Copy link

I have the same issue. This is my job.

    name: Deploy and Run Docker Container
    uses: appleboy/[email protected]
    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?

@lasaaliceblue
Copy link

I am also facing the same issue.

@steve-jr
Copy link

@appleboy The remote server is supposed to whitelist Github actions IPs
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-githubs-ip-addresses

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