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

MacOS could't connect with ssh to VM ubuntu #3143

Closed
Lisstrange opened this issue Sep 28, 2021 · 7 comments
Closed

MacOS could't connect with ssh to VM ubuntu #3143

Lisstrange opened this issue Sep 28, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@Lisstrange
Copy link

Lisstrange commented Sep 28, 2021

Describe the issue
I have tryed to setup linux VM on Mac M1 (https://medium.com/@lizrice/linux-vms-on-an-m1-based-mac-with-vscode-and-utm-d73e7cb06133)

I installed ubuntu VM, selected newtwork mode emulated VLAN . Setup port like there
https://miro.medium.com/max/4800/1*yABPQBtxXg8_5l8MlYOLqA.png

Ubuntu server can see your adress (ssh -p 22 127.0.0.1)
But Macbook can't find it.

  • ssh -p 2200 127.0.0.1
    return: Connection reset by peer

Configuration

  • UTM Version : 2.2.4
  • OS Version: 12.0
  • Intel or Apple Silicon? Apple Silicon

what should I do?

@conath
Copy link
Contributor

conath commented Sep 28, 2021

Duplicate of #2534

You need to switch to another mode other than emulated network to use SSH. #2535 (comment)

@osy This issue has been around for some time and I can reproduce. Is this something that can be fixed here or is it QEMU/SPICE territory?

@conath conath added the bug Something isn't working label Sep 28, 2021
@ml2s
Copy link

ml2s commented Sep 29, 2021

Is sshd active on Ubuntu? Inside VM, try:

ssh localhost
or
sudo systemctl status sshd

if it's not even installed:

sudo apt install openssh-server

@Lisstrange
Copy link
Author

@conath I selected Network mode - shared network initially.

@Lisstrange
Copy link
Author

@ml2s ssh is active
Снимок экрана 2021-09-29 в 23 19 33

@Lisstrange
Copy link
Author

Lisstrange commented Sep 29, 2021

 I decide the problem:
 1) select Network mode - shared network
 2) get guide to connect ssh
 
Снимок экрана 2021-09-29 в 23 01 08

  1. connect to ubuntu server with ssh <YOUR_USERNAME>@guide host

Снимок экрана 2021-09-30 в 00 49 55

@conath
Copy link
Contributor

conath commented Sep 30, 2021

@Lisstrange Thanks for sharing your fix. Does this also work in Emulated Network mode?

@anzbert
Copy link

anzbert commented Mar 13, 2022

hey @Lisstrange what does step two mean in your fix?

2) get guide to connect ssh

Thx :)

ah ive got it... just used the ip adress discovered by using ip addr in the VM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants