1

Could anybody tell me the exact steps to make a secure connection from my server to my external IP address using SSH... I would like to access my Ubuntu server from other places... But securely.

2

1 Answer 1

0

The linked answer is about SFTP, which is more complicated. Configuring ssh server is much easier.

Step 1 : Install OpenSSH package if not installed

sudo apt-get install openssh-server

Step 2 : Add to your /etc/ssh/sshd_config

PermitRootLogin no

Step 3 : Restart sshd service.

sudo service ssh restart

Step 4 : Generate key pair on the computer from where you want to access your machine and copy the public part to your machine:

ssh-keygen -f ~/.ssh/id_rsa
ssh-copy-id -i ~/.ssh/id_rsa your_machine
3
  • Ok... Great answer! But is there a certain port I have to allow? Or what is the port so I can access it remotely
    – Noah
    Jan 17, 2016 at 16:11
  • 1
    Default port for ssh is 22. You should allow it in your firewall if you use one.
    – Jakuje
    Jan 17, 2016 at 19:40
  • When you say your machine... Do you mean your machine IP address or the name of it... Because I tried the name of my server and that did not work... How safe is this also... Even with the recent Open SSH Attacks... Could you explain the questions I have to me please?
    – Noah
    Jan 19, 2016 at 0:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .