Dennola4 wrote:2) modified ssh and sshd config files so that "no" was changed to "yes" on: ForwardAgent, ForwardX11 and Tunneling. (I left them commented, though).
Leaving them commented is like you never edited them. But it's ok, since you don't really want any of that and it's better that you don't use them anyway.
You need to take this step by step. First make sure that you have a working ssh connection. Better change the ssh port too as others said. Restart the ssh server after you do. Try to connect locally first. While on the server, try to connect with ssh:
exchange ssh_port with the port you're using and user with your username. If that works and you get logged in, your server is running fine.
Then try the same from inside your local network, from another pc:
change server_ip to the respective local ip address of the server (using dhcp is not recommended, use static ips).
Now try creating an ssh tunnel from the server to the client. Run this in the client:
Code: Select all
ssh -p ssh_port -C -t -L 5900:localhost:5900 user@server_ip 'x11vnc -display :0'
you should now be able to connect using vnc through that tunnel with
Code: Select all
vncviewer -compresslevel 9 localhost
(the -C option in ssh and the compresslevel in vncviewer is for compressing, should not matter with local connections, but it could make a difference with remote connections later).
If you connect, you need to make sure that the ssh_port you're using is forwarded from your router to your server pc. That way you can connect from outside your local network using the same two commands, replacing only the local server_ip with your external ip.
3) Ran ssh-keygen -t dsa which created id_dsa and id_dsa.pub in ~/.ssh (passphrase was created, presumably using downloaded repo pkg x11-ssh-askpass.
You did that on the client, right? That will help you login to your server without the need for typing your password. But you need to add those keys you created in your client to your server too. The easiest way to do it, is to take the id_dsa.pub file with your in a usb drive, connect it to your server and run:
Code: Select all
cat id_dsa.pub > ~/.ssh/authorized_keys2
If you try to connect with ssh after that you should need no password. You can now disable password logins with ssh and permit only passwordless logins, so that nobody else can connect unless they have your key.
5) From client computer (Mac) ran all sorts of weird commands, like:
ssh -X root@xx.xxx.xxx.xx which kept timing out.
Don't try to login as root. It's disabled by default and you better leave it like that. You don't need -X either as X11 forwarding is not what you want.