3 ms·
Do: sudo ufw allow proto tcp from any to any port 22 sudo ufw enable Then you can just edit /etc/ssh/sshd_config the same as you would on OpenBSD.
by phaemon 13y ago
Do:
sudo ufw allow proto tcp from any to any port 22
sudo ufw enable
Then you can just edit /etc/ssh/sshd_config the same as you would on OpenBSD.
- rschmitty 13y agoThis is why I love having a static IP. sudo ufw allow from your.ip.addr to tcp port 22 Rest of the world doesnt know I have ssh up and if I'm ever in a hotel or something I can tunnel through my home or login to DO's panel and allow another ip
- aroch 13y agoI have essentially a static IP (A 'dynamic' IP with a 6month lease that stays the same on renewal and follows my account regardless of where I live), but you're super fucked if for some reason your IP changes. I usually set it to the /24 I'm assigned from.
- rschmitty 13y agoHow are you screwed? You can always login to the console in the web admin and change it
- fredsted 13y agoI could imagine this being quite dangerous, like being on holiday, there's a power outage, fire, ISP error, etc at home and no way to control your server.
- deleted 13y ago[deleted]
- bananas 13y agoDon't do that. I did that once and our static ip changed suddenly despite lots of money being spent on it. That was a painful day driving from London to Manchester for me to get to the console.
- rschmitty 13y agoThere is a web console, you never have to drive... or worry :)
- shirkey 13y agoOr: sudo ufw limit ssh sudo ufw enable To automatically rate limit connections -- see https://wiki.archlinux.org/index.php/Uncomplicated_Firewall#Rate_limiting_with_ufw https://wiki.archlinux.org/index.php/Uncomplicated_Firewall#...