Install the ssh server if it hasnt been already:
sudo pacman -S opensshVerify that the openssh service is running
sudo systemctl status sshd.serviceIf it isnt running enable and start it:
sudo systemctl enable sshd.serviceThe next thing you'll want to do is add a firewall rule to allow connections to the server over the network. By default it comes over port 22. So we'll add a new firewall rule:
sudo systemctl start sshd.service
sudo ufw allow 22/tcpNow you should be able to connect to your computer from the ip address. You can also connect to it using the name of the computer.
ssh username@123where username is your username on the computer and 123 is the ip address. you can also just type the name of the computer and .local. It'll give you a warning by default, just type yes.if you're really concerned about security you can always use Google to find a guide about locking things down, but I wouldnt worry much since if your ISP configured things properly no one would be able to accesss your computer from outside anyways. So to connect to my thinkpad which is on the same network Id type.
ssh adrien@thinkpad.localNote: if the computer is local on the network and you dont append .local to the end it'll throw an error because it wont be able to resolve it. If the computer isnt local you'll have to figure out its' ip address from the outside network. Though you'll probably have to configure something with your router to let connections in if the computer is at your home, a lot of ISPs block connections from outside far as I know.
Unrelated Note: If you want to transfer files over ssh on a local network and it's assumed you're running a version of Manjaro linux(or Ubuntu) with the xfce Desktop Environment you can type the following in the address bar of thunar:
ssh://username@computername.localIt'll prompt you with a dialogue box to login to the computer via the gui and you can transfer files to it just as you would if the drive was on your computer.
No comments:
Post a Comment