Add new comment

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by Tenzer (registered user) on Thu, 2008-05-29 17:47.

I would say that a much better approach is to use the .ssh/config file in your home dir. (create it if it's missing). Then you have all the settings together in one place, and you don't need extra scripts or root privileges for instance to change the hosts file.An example of a host entry in the config file could be: Host server #Name of the host
Hostname 192.168.10.20 #IP address or DNS name
Port 2222 #Custom port number
User root #Username to use
In order to connect to the host, we just type "ssh server" and all the settings defined in the file will be used. It also works with scp.You don't have to be familiar with shell scripting in order to use this, and it is easier to copy the one file around between several clients where you would use it.The best part is that it also works with tab completion when you have typed "ssh " :)

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.