Easy ssh configuration with .ssh/config file
If you ssh to many hosts then you are aware of the pain that it takes to ssh with different username and hostname. There is an alias that you can creat with native ssh though. Here I will show you the same with an example.
1
2 3 4 5 |
You can optionally omit the parameters that you do not require explicitly. For example, if your port number is default then you can simply ignore the parameter.
Once this is done, you can simply ssh with the alias name, for ex:
1
|
Note: Remember to change the mode of the config file to “644” if the file does not exist already.
Add this with the key authentication for ssh and you have a password-less alias based ssh setup 🙂
Related articles
- Guaranteeing scripts don’t get hung on remote ssh (standalone-sysadmin.com)
- Configuring SSH (ciscoskills.net)
- Accessing a BackTrack server via mobile phone in a secure way (hackoblog.com)
- How to connect to a non standard SSH port in the Mac terminal (chimac.net)
Related Articles:
- 2010/07/27 PuTTY alternatives - AlternativeTo.net
- 2010/08/09 [Solution] Solaris issue with wget not resolving Domain name (DNS name lookup failure)
- 2010/05/25 mussh - Multihost SSH wrapper
- 2010/05/06 Solved – Errors with afraid-dyndns in Goddard (Fedora 13)
- 2011/03/04 configuration for afraid-dyndns on Fedora and other similar distro.
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.