{ Notes }

SSH config - permission denial while accessing remote system

Posted on | Development linux

Nowadays most developers work remotely or somehow connect remotely by running remote connections. These connection are mostly linked to remote compute clusters, remote desktops and remote servers also including cloud computing servers such as Amazon EC2. Accordingly its equally difficult to remember intricate IP addresses also it becomes worse when you list of different computers to connect. In this post I will try to explain and guide you through the process of making password less ssh connections.

It’s always convenient to perform remote SSH connections using host names rather attempting to remember IP address of remote computer or server. Subsequently it’s more expedient and a smarter choice when one requires to connect multiple remote machines. Correspondingly it requires multiple complicated IP address or number to remember.

Apparently this technique is convenient to me, as I have to connect to two of office desktops and two HPC clusters. Recently I was trying to set up SSH keys and corresponding configuration files for remote connection from my new PC. Following are steps to create SSH configuration and applies to any Linux OS.

  1. create an simple text file with name ‘config’ inside .ssh folder in your user directory.
  2. Inside the text file input ‘Host’ followed by user defined name you would like.
  3. Next line ‘HostName’ followed by IP address of the remote machine
  4. Next line ‘User’ followed by your user name you’re registered with on destined machine.

Accordingly now you can connect to remote machine using ssh <host-name used in config file>

Note: some cases likewise in my case I received an error message complaining_ “Bad owner or permissions on /home/username/.ssh/config”

Solution: simply change the permission of config file to chmod +x 600