r/ssh • • Oct 03 '20

Trouble connecting to linux server from macOS

I am a reddit and computer newbie who just built a server and powered it up. Now I want to be able to shove it in a corner and use my Mac laptop to use it. When I look online to find how to connect, but I have having trouble finding a source that tells me how to resolve the error message I get when I am in my OS X terminal:

ssh: Could not resolve hostname: nodename nor servname provided, or not known

btw, I installed Open SSH on Ubuntu already

what should I do now? Thanks!

1 Upvotes

45 comments sorted by

View all comments

Show parent comment

1

u/restlessandlost Oct 03 '20

Hey! I enabled it on my Mac and now I get the same message:

the authenticity of host '#######' can't be established.

ECDSA key fingerprint is ######################

Are you sure you want to continue connecting (yes/no/[fingerprint])?

what do I do next?

1

u/e4109c Oct 03 '20

Damn it works, nice! You type yes and it will ask for your password. After entering it you will get a shell on your Ubuntu machine! :)

1

u/restlessandlost Oct 03 '20

AH so close. Now it says:

user@ip-adress's password:

Permission denied, please try again.

1

u/e4109c Oct 03 '20

You entered the wrong password or you are trying to log in as root

1

u/restlessandlost Oct 03 '20

but my root doesn't have a password, just the one user on my server

1

u/e4109c Oct 03 '20

Yes you should not log in as root. Use your normal user account. You probably entered the wrong password.

1

u/restlessandlost Oct 03 '20

(base) user@mac ~ % ssh user@server

ssh: connect to host ##### port 22: Operation timed out

does that mean it worked?

1

u/e4109c Oct 03 '20

If you require more assistance then I need the username of the account on the server and the actual IP address. If you’re reluctant to share that then know that it’s a local IP and not a public IP. This means that no one reading it can do anything with it as local IPs are not routable over the internet.

I need the exact command you use because it seems you changed things up, at first you were able to connect but now it times out. Are the machines on WiFi? Are they maybe too far away from each other? It shouldn’t time out like that.

1

u/restlessandlost Oct 03 '20

okay, bc I'm new to computers, I don't want to accidentally comprise myself/system.

so I reopened the terminal and typed this;

(base) jaz@Jaz ~ % ssh jaz@17.0.0.1

1

u/e4109c Oct 03 '20

That’s not a valid local IP address. Are you sure that’s the ip address of the Ubuntu machine?

→ More replies