can't connect to osmc with ssh

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
charroo
Level 4
Level 4
Posts: 498
Joined: Mon Aug 14, 2017 9:45 am
Location: ISRAEL!

can't connect to osmc with ssh

Post by charroo »

trying to connect osmc with

Code: Select all

ssh osmc@192.168.1.106
but get

Code: Select all

 ssh: connect to host 192.168.1.106 port 22: Connection refused 
why is that?
it says ssh "running" in the osmc settings and also it is running on my mint machine......

can't understand what i did not do right..
Last edited by LockBot on Sun Dec 03, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
i'm on Linux Mint 21.3 Cinnamon
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: can't connect to osmc with ssh

Post by Termy »

I assume by 'osmc' you mean Opensource Media Center. Is the remote machine set to use port 22 for its SSH server? Is the remote machine's firewall set to allow incoming connections to port 22? Also, might as well confirm the service is running properly systemctl status ssh on the server. I'm assuming this OSMC thing is just a Linux distribution of sorts. Not sure what else to suggest, as I'm not familiar with OSMC.

If the server uses a different port, you can specify it with, for example:

Code: Select all

ssh -p 22 osmc@192.168.1.106
I don't use SSH much now, as from for GitHub, so I might be forgetting what all the errors look like, but I am wondering if it's possible that the server requires keys be used instead of password access. I for some reason assumed you haven't set up keys. Are you using keys or passwords? Have you been able to successfully log in at all? You can check the SSH daemon settings on the server by looking at the '/etc/ssh/sshd_config' file.

Hopefully someone more familiar with OSMC can chime in, because that's about all I have! :lol:
I'm also Terminalforlife on GitHub.
charroo
Level 4
Level 4
Posts: 498
Joined: Mon Aug 14, 2017 9:45 am
Location: ISRAEL!

Re: can't connect to osmc with ssh

Post by charroo »

thank you
i've been told that it is probably not well installed on the osmc [the ssh].
i will need to find how to switch the ssh on..
i'm on Linux Mint 21.3 Cinnamon
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: can't connect to osmc with ssh

Post by Termy »

charroo wrote: Sat Jun 03, 2023 5:09 pm [...]
I don't recommend the default port 22 for SSH, by the way. If it's just an offline machine, then it doesn't matter much. You can change it to your own port in '/etc/ssh/sshd_config' on the other machine. If you change the port at a later date, you'll need to update UFW (see below) and restart the service.

To hopefully get SSH working: on the other system, run sudo systemctl enable --now ssh to enable and start the service. If the other system uses UFW, ensure you have a rule set up for the SSH server. If you don't, first replacing 'PORT' with your SSH port, run sudo ufw allow in PORT/tcp comment SSH, if I remember the syntax correctly. This should create an IPv4 and IPv6 rule for the SSH server. Not sure what else I can suggest at this point, unfortunately. Let us know how you get on.
I'm also Terminalforlife on GitHub.
User avatar
Gruppo Sportivo
Level 4
Level 4
Posts: 276
Joined: Sun May 28, 2017 4:14 am
Location: 🇳🇱

Re: can't connect to osmc with ssh

Post by Gruppo Sportivo »

Are you using PuTTY is an SSH Client ??,or entering the command˙s through the terminal interface
Perhaps it might be an security key issue,check out the info at the given link below
https://osmc.tv/wiki/general/accessing- ... mand-line/
charroo
Level 4
Level 4
Posts: 498
Joined: Mon Aug 14, 2017 9:45 am
Location: ISRAEL!

Re: can't connect to osmc with ssh

Post by charroo »

thank you all

i will check what you have suggested soon..
i'm on Linux Mint 21.3 Cinnamon
Locked

Return to “Networking”