スキップしてコンテンツを表示

Cannot access my EC2 instance via VNC

0

I have implemented a VNC server on my instance. I made sure of which port to access. Please refer to the following:

$vncserver -list

TigerVNC server sessions:

X DISPLAY # PROCESS ID :1 6146

But I can't seem to access it through a VNC viewr (FYI, I'm using Ultra VNC Viewer.)

I made sure that the inbound rule is specified for all 'Port range' , and is available for the source IP address that I'm accessing from.

質問済み 2年前472ビュー
3回答
2

You may find it helpful to keep in-mind that an EC2 instance with a Public IP address, relies on the Internet Gateway to perform the (inbound) NAT. I'd try to find a solution that doesn't use an inbound rule of ANY Source IP but if you really need to deploy this architecture, here is a reference deployment: Linux Bastion Hosts on AWS - Remote access in the AWS Cloud

AWS
回答済み 2年前
1

Hello,

To troubleshoot the issue, try the following steps:

Check the security group: Ensure that the inbound rule for the VNC port (default is 5901) allows traffic from your IP address.

Verify the VNC server configuration: Make sure the VNC server is configured to accept connections from external IP addresses.

Check the instance's network settings: Ensure that the instance's network settings allow outbound traffic on the VNC port.

Try a different VNC viewer: Try using a different VNC viewer, such as TightVNC or RealVNC, to rule out any issues with Ultra VNC Viewer.

Check the instance's system logs: Check the instance's system logs for any error messages related to the VNC server or connections.

Restart the VNC server: Try restarting the VNC server to see if it resolves the issue.

エキスパート
回答済み 2年前
  • Thanks for your help. Can you tell me more about 'VNC server configuration'? perhaps I should modify '.vnc/xstartup' or '.vnc/config'?

0

Probably a daft question, but is your EC2 instance running in graphics mode? What I mean is, you've installed GNOME or XFCE or similar, and enabled it, and the Linux default run-level is set to graphical.target ?

エキスパート
回答済み 2年前
  • Thanks for the help. I have installed GNOME, but I haven't touched any settings. could you please guide me which files to check?

  • sudo systemctl get-default will display the current default run level. If this isn't graphical.target then set it to that with sudo systemctl set-default graphical.target I would advise taking a backup or snapshot of the system before you start, just in case this leaves your system unbootable or unreachable.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

関連するコンテンツ