Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Couldn't connect VM using SSH #2534

Closed
ghost opened this issue May 15, 2021 · 2 comments
Closed

Couldn't connect VM using SSH #2534

ghost opened this issue May 15, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented May 15, 2021

I have installed UTM on my Mac M1 and created a virtual machine using the RHEL7.6 ISO image.
The installation of the virtual machine was successful, but when I try to connect to the created virtual machine from my local machine using port forwarding, I get the following error and it fails.

$ ssh root@localhost
kex_exchange_identification: read: Connection has been reset by peer

I would like to know how to solve this.

[Environment]
OS: macOS Big Sur
Architecture M1
UTM Version: 2.0.28 (28)

@DumbGameMaker
Copy link

try setting up port forwarding to a different port than ssh (i. e. port 4321), and set up sshd in RHEL to listen on that port, then try this
$ ssh root@localhost -p <port>

@ghost
Copy link
Author

ghost commented May 16, 2021

Hi
Thank you for your comment.

I have configured port 4321 on the local PC to be port forwarded to port 22 on the virtual machine.
image

However, I get the same error.
$ ssh -v root@localhost -p 4321
OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to localhost port 4321.
debug1: Connection established.
debug1: identity file /Users/minamii0425/.ssh/id_rsa type 0
debug1: identity file /Users/minamii0425/.ssh/id_rsa-cert type -1
debug1: identity file /Users/minamii0425/.ssh/id_dsa type -1
debug1: identity file /Users/minamii0425/.ssh/id_dsa-cert type -1
debug1: identity file /Users/minamii0425/.ssh/id_ecdsa type -1
debug1: identity file /Users/minamii0425/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/minamii0425/.ssh/id_ed25519 type -1
debug1: identity file /Users/minamii0425/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/minamii0425/.ssh/id_xmss type -1
debug1: identity file /Users/minamii0425/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
kex_exchange_identification: read: Connection reset by peer

Port 22 is being listened on the virtual machine.
image

Where else should I check?

@osy osy closed this as completed May 16, 2021
@utmapp utmapp locked and limited conversation to collaborators May 16, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants