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

Unable to connect via ssh #849

Open
grallewellyn opened this issue Oct 26, 2023 · 8 comments
Open

Unable to connect via ssh #849

grallewellyn opened this issue Oct 26, 2023 · 8 comments
Assignees

Comments

@grallewellyn
Copy link
Collaborator

grallewellyn commented Oct 26, 2023

I am just seeing my ssh as undefined (separate issue), but @rtapella gets
% ssh root@54.191.120.17 -p 32413
ssh: connect to host 54.191.120.17 port 32413: Connection refused

@grallewellyn grallewellyn self-assigned this Oct 26, 2023
@rtapella
Copy link
Collaborator

might be fixed by #850
?

@grallewellyn
Copy link
Collaborator Author

I tested #772 and it is still not working for me and was not fixed by #850

@rtapella You were the one getting the connection refused behavior (I was not able to replicate this)
Do you still get this error after uploading your ssh key?

@rtapella
Copy link
Collaborator

same behavior.
tried making a fresh 2048 bit key. added to authorized_keys file and uploaded it via the Profile.

@rtapella
Copy link
Collaborator

(ssh key upload worked fine)

@rtapella
Copy link
Collaborator

I am still seeing the same behavior. Tried 2048 and 4096 bit keys

@rtapella
Copy link
Collaborator

I added it to the Profile and to ~/.ssh/authorized_keys and logged out/in to refresh everything. I also stopped and started the workspace. Still "Connection refused"

@jerry-clayton
Copy link

Hi, I am a new user and ran into this problem. I was finally able to get SSH to work for me using these steps:

  1. Followed MAAP instructions to upload SSH key. I used a 2048 bit key.
  2. run apt-get update
  3. run apt -get install systemctl
  4. run apt-get install openssh-server
  5. run systemctl enable sshd
  6. followed the instructions in this AskUbuntu answer (The answer says to add these lines to a file in /etc, but that file did not exist for me, so I just ran the commands in terminal):
  7. mkdir /var/run/sshd
  8. chmod 0755 /var/run/sshd
  9. run systemctl start sshd

After this I was able to SSH into the server. A few linked answers to the one above imply there is some sort of issue with the version of openssh-server, but it is unclear to me the exact root of the issue is. Either way, this solved it for me. I hope it helps!

@wildintellect
Copy link
Collaborator

@jerry-clayton thanks for the info.

@grallewellyn seems like maybe we're not configuring the ssh service correctly in the images. Note: we don't want to leave this to the users, since we'd want to control the sshd configuration and have it be persistent. Question is what changed in recent images this used to work in older images @sujen1412 @bsatoriu ?

@grallewellyn grallewellyn added this to the v4.2.0 milestone Dec 4, 2024
@grallewellyn grallewellyn removed this from the v4.2.0 milestone Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants