0

Pretty new to Linux here. Trying to get a better grip on the OS.  Here is my problem -

I have a question about the impact of removing ssh_config file from a Linux box. I was having some cipher mismatch problems while trying to SCP files from my Linux box to my Mac. In trying to play around with things and get it working, I created a backup of my ssh_config file and deleted the original ssh_config file, and then the scp transfer worked.

I was a bit surprised at this as I was under the impression that ssh_config is used by my SSH client on the Linux box and ideally the scp should have failed without it. Since SCP worked after deleting it, then maybe my understanding of the signifiance of the ssh_config file was wrong.

Can you please help me understand how the scp transfer is working even without the ssh_config file?

  • For clarification, do you mean your ~/.ssh/config file? – ryekayo Apr 29 '16 at 1:10
  • I think the op means /etc/ssh/ssh_config – Liam Apr 29 '16 at 1:48
  • Took the default settings? – fpmurphy Apr 29 '16 at 2:29
  • hey guys..thanks for your responses...my bad for not specifying the path earlier.. I meant I removed "/etc/ssh/ssh_config" file – user168115 Apr 29 '16 at 2:34
  • @fpmurphy,..I dont see any default config file..... these are all the files that I see in the /etc/ssh/ dir right now - ssh_config_backup <<< this is the one I backed up <<< ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_ecdsa_key ssh_host_ecdsa_key.pub ssh_host_key ssh_host_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub sshd_config – user168115 Apr 29 '16 at 2:36
1

Like most configuration files, /etc/ssh/ssh_config only needs to list options that are changed from the default. If the file isn't present, ssh uses the default options. If you aren't relying on non-default settings, then the absence of the file has no impact.

For example, on Debian, the only options that are in the default ssh_config file are:

SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes

scp doesn't care about locale settings to the SendEnv line doesn't impact it. HashKnownHosts doesn't stop anything from working, it only influences how new entries are written to ~/.ssh/config. Without the GSSAPIAuthentication, scp would not work — but only if you were using GSSAPI authentication, which is very uncommon (it's pretty much only used in Kerberos).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.