SSH into EC2 instance: Operation timed out
up vote
0
down vote
favorite
I'm trying to ssh into my ec2 instance in order to deploy my MEAN-stack app but no matter what I'm receiving a timeout error. I've tried so many solutions that were posted in other StackExchange threads but to no avail. I am running macOS 10.14.1
On my mac I've tried connecting via FileZilla, Cyberduck and even using command line arguments such as ssh -v -v -v -i "<pem-file-name>.pem" ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com and ssh ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com. Below is the error output from running either of these commands:
OpenSSH_7.1p2, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-18-207-106-113.compute-1.amazonaws.com [18.207.106.113] port 22.
debug1: connect to address 18.207.106.113 port 22: Connection timed out
ssh: connect to host ec2-18-207-106-113.compute-1.amazonaws.com port 22: Connection timed out
These are the solutions that I've tried that did not seem to work:
Connecting on Windows 10 using PuTTY, FileZilla and command line, but also received the same timeout errors.
Using a different MSI (first with Bitnami, then with Ubuntu)
Firewall is disabled
Resetting the default port in
/etc/ssh/ssh_configand connecting to the new portPinging
ec2-18-207-106-113.compute-1.amazonaws.comand18.207.106.113is successful
Running command
netstat -nat | grep 22gives the below output
tcp4 0 0 192.168.254.17.56207 17.249.188.80.5223 ESTABLISHED
9e4be63389882253 stream 0 0 0 9e4be6338988231b 0 0
9e4be6338988231b stream 0 0 0 9e4be63389882253 0 0
9e4be63384ea2193 dgram 0 0 0 9e4be63384ea225b 9e4be63384ea225b 0
9e4be63384ea225b dgram 0 0 0 9e4be63384ea2193 9e4be63384ea2193 0
kctl 0 0 22 9 com.apple.netsrc
The EC2 security group has the following inbound rules set up: EC2 Security Group
ubuntu ssh putty amazon-ec2 cyberduck
add a comment |
up vote
0
down vote
favorite
I'm trying to ssh into my ec2 instance in order to deploy my MEAN-stack app but no matter what I'm receiving a timeout error. I've tried so many solutions that were posted in other StackExchange threads but to no avail. I am running macOS 10.14.1
On my mac I've tried connecting via FileZilla, Cyberduck and even using command line arguments such as ssh -v -v -v -i "<pem-file-name>.pem" ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com and ssh ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com. Below is the error output from running either of these commands:
OpenSSH_7.1p2, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-18-207-106-113.compute-1.amazonaws.com [18.207.106.113] port 22.
debug1: connect to address 18.207.106.113 port 22: Connection timed out
ssh: connect to host ec2-18-207-106-113.compute-1.amazonaws.com port 22: Connection timed out
These are the solutions that I've tried that did not seem to work:
Connecting on Windows 10 using PuTTY, FileZilla and command line, but also received the same timeout errors.
Using a different MSI (first with Bitnami, then with Ubuntu)
Firewall is disabled
Resetting the default port in
/etc/ssh/ssh_configand connecting to the new portPinging
ec2-18-207-106-113.compute-1.amazonaws.comand18.207.106.113is successful
Running command
netstat -nat | grep 22gives the below output
tcp4 0 0 192.168.254.17.56207 17.249.188.80.5223 ESTABLISHED
9e4be63389882253 stream 0 0 0 9e4be6338988231b 0 0
9e4be6338988231b stream 0 0 0 9e4be63389882253 0 0
9e4be63384ea2193 dgram 0 0 0 9e4be63384ea225b 9e4be63384ea225b 0
9e4be63384ea225b dgram 0 0 0 9e4be63384ea2193 9e4be63384ea2193 0
kctl 0 0 22 9 com.apple.netsrc
The EC2 security group has the following inbound rules set up: EC2 Security Group
ubuntu ssh putty amazon-ec2 cyberduck
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to ssh into my ec2 instance in order to deploy my MEAN-stack app but no matter what I'm receiving a timeout error. I've tried so many solutions that were posted in other StackExchange threads but to no avail. I am running macOS 10.14.1
On my mac I've tried connecting via FileZilla, Cyberduck and even using command line arguments such as ssh -v -v -v -i "<pem-file-name>.pem" ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com and ssh ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com. Below is the error output from running either of these commands:
OpenSSH_7.1p2, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-18-207-106-113.compute-1.amazonaws.com [18.207.106.113] port 22.
debug1: connect to address 18.207.106.113 port 22: Connection timed out
ssh: connect to host ec2-18-207-106-113.compute-1.amazonaws.com port 22: Connection timed out
These are the solutions that I've tried that did not seem to work:
Connecting on Windows 10 using PuTTY, FileZilla and command line, but also received the same timeout errors.
Using a different MSI (first with Bitnami, then with Ubuntu)
Firewall is disabled
Resetting the default port in
/etc/ssh/ssh_configand connecting to the new portPinging
ec2-18-207-106-113.compute-1.amazonaws.comand18.207.106.113is successful
Running command
netstat -nat | grep 22gives the below output
tcp4 0 0 192.168.254.17.56207 17.249.188.80.5223 ESTABLISHED
9e4be63389882253 stream 0 0 0 9e4be6338988231b 0 0
9e4be6338988231b stream 0 0 0 9e4be63389882253 0 0
9e4be63384ea2193 dgram 0 0 0 9e4be63384ea225b 9e4be63384ea225b 0
9e4be63384ea225b dgram 0 0 0 9e4be63384ea2193 9e4be63384ea2193 0
kctl 0 0 22 9 com.apple.netsrc
The EC2 security group has the following inbound rules set up: EC2 Security Group
ubuntu ssh putty amazon-ec2 cyberduck
I'm trying to ssh into my ec2 instance in order to deploy my MEAN-stack app but no matter what I'm receiving a timeout error. I've tried so many solutions that were posted in other StackExchange threads but to no avail. I am running macOS 10.14.1
On my mac I've tried connecting via FileZilla, Cyberduck and even using command line arguments such as ssh -v -v -v -i "<pem-file-name>.pem" ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com and ssh ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com. Below is the error output from running either of these commands:
OpenSSH_7.1p2, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-18-207-106-113.compute-1.amazonaws.com [18.207.106.113] port 22.
debug1: connect to address 18.207.106.113 port 22: Connection timed out
ssh: connect to host ec2-18-207-106-113.compute-1.amazonaws.com port 22: Connection timed out
These are the solutions that I've tried that did not seem to work:
Connecting on Windows 10 using PuTTY, FileZilla and command line, but also received the same timeout errors.
Using a different MSI (first with Bitnami, then with Ubuntu)
Firewall is disabled
Resetting the default port in
/etc/ssh/ssh_configand connecting to the new portPinging
ec2-18-207-106-113.compute-1.amazonaws.comand18.207.106.113is successful
Running command
netstat -nat | grep 22gives the below output
tcp4 0 0 192.168.254.17.56207 17.249.188.80.5223 ESTABLISHED
9e4be63389882253 stream 0 0 0 9e4be6338988231b 0 0
9e4be6338988231b stream 0 0 0 9e4be63389882253 0 0
9e4be63384ea2193 dgram 0 0 0 9e4be63384ea225b 9e4be63384ea225b 0
9e4be63384ea225b dgram 0 0 0 9e4be63384ea2193 9e4be63384ea2193 0
kctl 0 0 22 9 com.apple.netsrc
The EC2 security group has the following inbound rules set up: EC2 Security Group
ubuntu ssh putty amazon-ec2 cyberduck
ubuntu ssh putty amazon-ec2 cyberduck
asked Nov 26 at 15:51
Robert
31
31
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Welcome to SuperUser @Robert!
All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.
There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:
$ sudo hping -S -p 22 18.207.106.113
HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms
Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.
If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.
And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.
Good luck!
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Welcome to SuperUser @Robert!
All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.
There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:
$ sudo hping -S -p 22 18.207.106.113
HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms
Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.
If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.
And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.
Good luck!
add a comment |
up vote
0
down vote
accepted
Welcome to SuperUser @Robert!
All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.
There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:
$ sudo hping -S -p 22 18.207.106.113
HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms
Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.
If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.
And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.
Good luck!
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Welcome to SuperUser @Robert!
All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.
There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:
$ sudo hping -S -p 22 18.207.106.113
HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms
Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.
If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.
And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.
Good luck!
Welcome to SuperUser @Robert!
All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.
There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:
$ sudo hping -S -p 22 18.207.106.113
HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms
Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.
If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.
And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.
Good luck!
answered Nov 26 at 18:20
KJH
1757
1757
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378497%2fssh-into-ec2-instance-operation-timed-out%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown