You run the first command once to set up your public/private key pair and then you run the second command once for each host you want to connect to.
note: if non standard port use this "ssh-copy-id "[email protected] -p 31337"
now you have a password less login but still you will be prompt with the password you created on ssh-keygen but its more less troublesome rather then the actual password for each servers, and to make it more easier, we use alias on your ~/.ssh/config
put this on your file
after all of this is done, use this on your terminal to connect
note: if you get this error: “Bad owner or permissions on .ssh/config”
FIX: chmod 600 ~/.ssh/config
first this is to make sure you have installed SSH by using this command
sudo apt-get install openssh-server
then you will edit SSH config file with this command
sudo nano /etc/ssh/ssh_config
and add this on the end of the file
HostName (hostname ip address)
User (username you want to use eg is root)
Port (port #)
save and restart
sudo /etc/init.d/ssh restart
I noticed recently that ssh connections from my Dedicated Centos Server to my Fedora server would time out and disconnect if I left the connection idle for a long period of time. This really annoyed me, as you have to login again specially if you have some edited files open and forgot to save the changes you made
I added the following line to /etc/ssh/ssh_config :
That seems to have fixed the problem, and my centos server can now remain connected, though idle, to my server.
What this does, essentially is every 5 seconds, the client sends a small keep-alive packet to the server to make it look like the ssh connection is being actively used.
i have been thinking about this app PuTTY for Symbian OS, an SSH client for my new Nokia N95. After figuring out the correct version to download, there are several versions available for the different editions of Symbian, the installation was super easy and simply consisted of clicking a few confirmation buttons. By the way, the correct version for the Nokia N95 is the S60 third edition.
Regarding usage, I found using PuTTY useful for work ; I connected to one of my Fedora systems at home, and my boss servers, impressive stuff, even if I do say so myself! For me, the ability to run an SSH client gives a whole new meaning to the term “smartphone“. Is there anything this phone can’t do?
1.) Check the port to be used if its already in use or not: netstat -nap | grep port#
2.) Open the port to be used:
– if using CSF, add the port on “Firewall Configuration”, put it on TCP_IN and TCP_OUT, restart CSF.
– you may use iptables manually: iptables -A INPUT -p tcp –dport port# -j ACCEPT
3.) Save changes by issuing: “service iptables save”, don’t flush iptables this may bring the serve down, it happened to me :):)
4.) Edit SSH config (/etc/ssh/sshd_config), and comment our the “#Port 22” and change that to the new port. Please comment out “#Protocol 2,1” and use “Protocol 2” for security.
5.) Reload SSH config, “service sshd reload”, and restart SSH, “service sshd restart”.
Note: when restarting SSH for applying the new port please open another Putty window. Just in case you experience problem you still have an open SSH window. Don’t restart via WHM, this will close all open SSH window (putty), and this will present you a message that SSH didn’t started ok, but its running. Just try to login on the new SSH port.