I am using the internet server of university and trying to log in to my account on system from my laptop, using ssh -X username@server. It says connection timed out. when i tried from another system i was able to log in. i use system for pretty basic work and dont know much about the internal coding and all... From some of he pages online i think the problem is firewall or something similar. I have checked the status for open ssh server which is shown as active. Kindly guide me through how to solve this problem.
Install ufw It will handle the firewall.
This guide will help you go through the basics of firewalls.
Run these commands on the ssh-server machine
sudo apt-get install ufw sudo ufw allow ssh sudo ufw enable sudo ufw status
These will get you through.
Let me know what happened.
I believe your problem is with your ssh configuration, nothing to do with firewall for outgoing SSH session. See your /etc/ssh/ssh_config file and make sure you enable both the following:
ForwardX11 yes ForwardX11Trusted yes
For some situation, you might have to turn off trusted mode for things to work (all depends on the SSH setup in your university.
Hope this helps.
In cases where you can't edit the configuration in /etc/ssh/ssh_config, copy the file to your home directory and modify it there.
mkdir $HOME/.ssh cp /etc/ssh/ssh_config $HOME/.ssh/config
~/.ssh/config to enable X11 forwarding.