I'm hoping you guys can help. I've been searching for along time with reading the information on noip.com and couldn't figure out anything.
I've set up an SSH server on a home computer. I changed the port # in sshd_config and forwarded my port number to the router. I can connect to my sever fine if I am on the same network as the server (using ssh -p port# ) and can connect fine from a different net work using (ssh -p12xx ).
I have setup an noip account and have attained a host-id "me.ddns.net". downloaded the noip-DUC updater to update my ip address. My question, when i tried to ssh -p port# me.ddsn.net (my host name on noip doesn't use the @ symbol), I got a error Permission Denied (public key). To be clear, I can still connect to my server fine using the private ip and the public ip, just not via the host name from noip. As I've mentioned, I do use ssh-keys and have disabled password prompt. Do I need to configure an ssh-key for noip or upload my ssh-keys to noip? I've only been messing with SSH for 24 hours and is very unexperienced. I appreciate everyone's advice.
Thank you.
81 Answer
First of all, You NEVER upload your private keys to anywhere.
Let's get this right.
- Server is running ssh_d service on a different port (12xx)
- You forwarded 12xx port on your router to the server.
- You can connect if you are on the same network using
ssh -p 12xx - You can connect if you are on another network using
ssh -p 12xx - Both connections you are using the same origin box (i assume laptop)
Please verify this so we can help you troubleshoot your issue.
Just to give you a heads up since you claimed this is your first time playing with ssh. You need to use the "@" to connect if you are running locally with a different username than the one you want to use on the server. This is:
usernameA [laptop] ---> ssh ---> usernameA [server]
In that case, you would use:
ssh -p 12xx youraddres.no-ipIf you use different usernames, then you have to specify it by using "@". So if this is the case:
usernameA [laptop] ---> ssh ---> usernameB [server]
You should use:
ssh -p 12xx -ip 3