0

I am setting up my home server (Ubuntu Server 17.10) to access from work. I have created a static IP address for it and forwarded a port to it. Due to the answer here: https://askubuntu.com/a/51926/30140 I want to follow the instructions here: https://thepcspy.com/read/making-ssh-secure/ to secure my computer. I add the new user Work, and want to give Work its own key. I need to upload the public key using

ssh-copy-id user@my.host

My questions are: The user is presumably Work. What do I use for my.host? And, if I assigned port xxxx in the router to the IP address, do I need to edit the above command to reflect that?

J126
  • 147
  • The host is just an IP address of the router, if you are outside the local home network (in the office), or an IP of the server, if you are at home. The port can be modified with the -p option, for example ssh-copy-id -p 22000 user@my.host. Also, I am not sure 17.10 is such a good idea for a server. It's still unreleased, and is probably too new to be stable. 16.04 is a better option. – mikewhatever Sep 24 '17 at 22:19
  • @mikewhatever If I have a laptop that is sometimes at home and sometimes at the office, do I need two user accounts depending? – J126 Sep 24 '17 at 22:23
  • No. Use the same username, just a different IP address, public IP from office, private IP from home. public vs private IP. – mikewhatever Sep 24 '17 at 22:25
  • 1
    You must configure your home router to (1) allow connections from the internet and (2) give your server the same IP address all the time. If you set a unique IP for the server, you must use that IP make the connections. For instance, if the IP address in the router is 257.10.10.10, you must execute ssh user@257.10.10.10 -- You may use the same server IP address all the time. – Jaime Sep 25 '17 at 00:51

0 Answers0