*not* just another blog ;)

Using a VPS as a proxy with SSH

- Posted in Quick Tip by with comments

Just a quick tip, if you want to use a VPS as a proxy server through SSH then use this command (if your computer runs Linux)

ssh -D 12345 [email protected]

Replace 12345 with the port you want to use.

Then in Firefox, go to Preferences and add localhost as a Socks 5 proxy and the port 12345

I always test it first by going to Google and searching "What's my IP" to make sure it shows as the VPS's IP.

And you're done.

I've recently upgraded to using Ubuntu Server 17.04 and I have noticed that by default you must create a user instead of being able to login as root, which is a great idea for security, but makes things harder for permissions, etc.

Once the Ubuntu 17 server has been set up, all we need to do is modify /etc/ssh/sshd_config and add the line PermitRootLogin yes underneath the Authentication heading.

sudo nano /etc/ssh/sshd_config


#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

Once that's done, we just need to restart the ssh server

sudo systemctl restart sshd

Now, we need to make sure the root user has a password, if not, we can set one now.

sudo passwd

Enter the new root password, once that's done, try logging in as root with SSH, it should work now!