Skip to content

Commit fafe37f

Browse files
RoRoJbene2k1
authored andcommitted
fix(pgw): add more troubleshooting (#3862)
* fix(pgw): add more troubleshooting * Apply suggestions from code review Co-authored-by: Benedikt Rollik <[email protected]> * Update compute/instances/troubleshooting/cant-connect-ssh.mdx --------- Co-authored-by: Benedikt Rollik <[email protected]>
1 parent c0cb1ba commit fafe37f

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

compute/instances/troubleshooting/cant-connect-ssh.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,8 @@ You must upload the content of the public part of the SSH key pair to the Scalew
133133
If you have any difficulties connecting to an Instance after uploading a new public SSH key to your Project, try the following:
134134
- If you cannot connect to your Instance at all via SSH, reboot your Instance from the console and try again.
135135
- If you can connect to your Instance using a previously uploaded SSH key but not the new one, go ahead and connect to your Instance with the old key. Once connected, run the `scw-fetch-ssh-keys --upgrade` command, which launches a script on your Instance to update your SSH keys. You can then check that the new key has been added to the `authorized_keys` file (`~/.ssh/authorized_keys`). Note that this command works only for Instances.
136-
</Message>
136+
</Message>
137+
138+
## Timeout when trying to connect
139+
140+
You may find the SSH connection attempt times out without connecting. This may be expected behavior if the Instance is attached to a Private Network on which there is also a Public Gateway advertising the default route. See our [dedicated troubleshooting](/network/public-gateways/troubleshooting/cant-connect-to-instance-with-pn-gateway/) page for more help with this issue.

network/public-gateways/concepts.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ The Public Gateway can advertise a default route to resources on an attached Pri
1818

1919
You can choose to activate the advertisement of the default route when attaching a Private Network to a Public Gateway. The default route is propagated through DHCP.
2020

21+
<Message type="important">
22+
After activating the default route, all outbound and inbound traffic for resources attached to the Private Network is directed through the Public Gateway. This includes SSH traffic destined for Instances, which means you will need to [manage SSH connections differently](/network/public-gateways/troubleshooting/cant-connect-to-instance-with-pn-gateway/).
23+
</Message>
24+
2125
## DHCP
2226

2327
DHCP was previously a functionality of Scaleway Public Gateways, but has now been moved and is integrated directly into Private Networks. [Read more about DHCP on Private Networks](/network/vpc/concepts#dhcp).
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
---
22
meta:
3-
title: I cannot connect to my Instance using SSH after attaching it to a Private Network which has a Public Gateway
3+
title: I cannot connect to my Instance using SSH after attaching it to a Private Network with a Public Gateway
44
description: This page explains how troubleshoot connection problems after attaching an Instance to a Private Network which has a Public Gateway
55
content:
6-
h1: I cannot connect to my Instance using SSH after attaching it to a Private Network which has a Public Gateway
6+
h1: I cannot connect to my Instance using SSH after attaching it to a Private Network with a Public Gateway
77
paragraph: This page explains how troubleshoot connection problems after attaching an Instance to a Private Network which has a Public Gateway
88
tags: troubleshoot error private-network private network vpc public-gateway
99
dates:
10-
validation: 2024-05-24
10+
validation: 2024-10-21
1111
posted: 2021-05-26
1212
categories:
1313
- network
1414
---
1515

16-
<Macro id="requirements" />
16+
If you are having trouble [connecting to your Instance via SSH](/compute/instances/how-to/connect-to-instance/), when the Instance is attached to a Private Network which also has an attached Public Gateway, read on for help and solutions.
1717

18-
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
18+
The action to take depends on whether:
1919

20-
The action to take depends on whether the Private Network(s) your Instance is on have DHCP enabled, and whether your Public Gateway is set to advertise a default route (true by default).
20+
- The Private Network(s) attached to your Instance have [DHCP enabled](/network/vpc/how-to/activate-dhcp/), and
21+
- Your Public Gateway is set to [advertise a default route](/network/public-gateways/concepts/#default-route) (true by default).
2122

22-
If it is not the case, disconnect the Instance from the Private Network, as there may be other factors impacting your Instance, like one of your Instances running a DHCP server.
23+
If the above two conditions are not true, there may be other factors impacting your Instance, like one of your Instances running a DHCP server. Try disconnecting and reconnecting the Instance from the Private Network.
2324

24-
If DHCP is activated and your Public Gateway is set to advertise a default route, this is expected behavior as all the traffic towards your Instance now goes through the Public Gateway. To access your Instance using SSH, first create a static NAT association between a port of your Public Gateway (eg 2222) and the private IP assigned to your Instance, on the SSH port (22 by default). Then, SSH to the Public Gateway's IP on port 2222.
25+
If DHCP **is** activated and your Public Gateway **is** set to advertise a default route, not being able to connect to your Instance via SSH is **expected behavior**. All the traffic towards your Instance now goes through the Public Gateway.
26+
27+
To access your Instance using SSH, either:
28+
- Use [SSH bastion](/network/public-gateways/how-to/use-ssh-bastion/), or
29+
- Create a static NAT association between a port of your Public Gateway (eg 2222) and the private IP assigned to your Instance, on the SSH port (22 by default). Then, SSH to the Public Gateway's IP on port 2222.

0 commit comments

Comments
 (0)