SSH from Mac to Mint 17.1

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
ZeonOtaku

SSH from Mac to Mint 17.1

Post by ZeonOtaku »

I am upgrading my Minecraft server from a very outdated Mint that worked on an old HP P4 machine to a new machine using my old RAM and CPU -- much faster.

However when I try to ssh into the machine I get "connection refused"

Can I get a walkthrough in order to correct this? I've tried looking around, but I haven't found a successful solution.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: SSH from Mac to Mint 17.1

Post by altair4 »

I know nothing about Minecraft but if we are talking about ssh itself I think this should be asked in an OSX forum not a Linux forum.

If I'm reading your post correctly you successfully ssh'd into the old setup and now with the new setup you can't. If the new machine has the same host name or ip address as the old one it's likely because the key for the old machine still resides in your mac.

To find out open up the terminal in osx and run this command:

Code: Select all

cat /Users/$USER/.ssh/known_hosts
It should output something like:
mint-hostname.local ssh-rsa whole-bunch-of-nonsene-numbers
Those nonsense numbers is the key that let you into the old machine and is now preventing you from letting you into the new machine if the hostname is the same.

On OSX either use nano to edit the file and remove the line or use a command to remove the line. In this example something like this:

Code: Select all

ssh-keygen -R mint-hostname.local
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ZeonOtaku

Re: SSH from Mac to Mint 17.1

Post by ZeonOtaku »

I don't believe this is the problem as I'm trying to SSH from a mac that had never previously connected to either server.

I have just run a test where I had both machines running with my router assigning two different IP addresses via DHCP reservation.

192.168.1.4 (New) & 192.168.1.100 (Old)

Both would get a response from the old server, but a connection refused from the new server.

The new server is 17.1 Cinnamon. The old one I am looking for a version, but it's KDE.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: SSH from Mac to Mint 17.1

Post by altair4 »

Could it be something simple like not installing ssh on the new machine or the service isn't running:

Code: Select all

sudo service ssh status
Or a firewall in the way?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ZeonOtaku

Re: SSH from Mac to Mint 17.1

Post by ZeonOtaku »

I don't know about a firewall. Is there a firewall in 17.1?
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: SSH from Mac to Mint 17.1

Post by altair4 »

If you don't remember doing anything with one then that's not the issue.

You might want to check the status of it:

Code: Select all

sudo ufw status
If it's active for some reason you can either disable it:

Code: Select all

sudo ufw disable
Ot at least open the SSH port:

Code: Select all

sudo ufw allow OpenSSH
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ZeonOtaku

Re: SSH from Mac to Mint 17.1

Post by ZeonOtaku »

Just for clarification, my old server isn't running 17, it's probably running 12 or something whatever the LTR was then.
kwisher

Re: SSH from Mac to Mint 17.1

Post by kwisher »

The ssh server is not installed by default in Mint, only the client. Look in the package manager for openssh-server or do sudo apt-get install openssh-server from the terminal.
ZeonOtaku

Re: SSH from Mac to Mint 17.1

Post by ZeonOtaku »

I will certainly try this later today. Do I need to do anything to configure it?
kwisher

Re: SSH from Mac to Mint 17.1

Post by kwisher »

ZeonOtaku wrote:I will certainly try this later today. Do I need to do anything to configure it?
No extra config necessary unless you want to change the default port, which should be done on a public facing machine, or you want to setup automatic login with ssh keys.
ZeonOtaku

Re: SSH from Mac to Mint 17.1

Post by ZeonOtaku »

Sorry it's been a while but this is the first time I've had to work on it in some time.

I just installed OpenSSH-server and when trying to log in. I got this message:

Last login: Wed Jul 15 07:15:06 on console
MacBook-Pro:~ phish$ ssh minecraft@192.168.1.4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
99:e9:13:24:b9:e6:e6:01:63:7c:1f:8e:00:dc:00:35.
Please contact your system administrator.
Add correct host key in /Users/phish/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/phish/.ssh/known_hosts:1
RSA host key for 192.168.1.4 has changed and you have requested strict checking.
Host key verification failed.
MacBook-Pro:~ phish$
ZeonOtaku

Re: SSH from Mac to Mint 17.1

Post by ZeonOtaku »

Never mind, I fixed it. Just curious, how do I change the port?
kwisher

Re: SSH from Mac to Mint 17.1

Post by kwisher »

ZeonOtaku wrote:Never mind, I fixed it. Just curious, how do I change the port?
Let me Google that for you :) Joking
https://help.ubuntu.com/community/SSH/O ... onfiguring
Locked

Return to “Networking”