10 Useful SSH (Secure Shell) Interview Questions and Answers

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

35 Responses

  1. Lingamoorthy.dasari says:

    which you provide information regarding ssh is nice, it ‘s very useful to sysadmins in linux.

  2. Alan labastida says:

    I hope you can help me.
    What is the -f flag in scp?

    Thank you

    • Ravi Saive says:


      There isn’t any -f switch in scp man pages, yes there is capital -F option, which is used to specify per-user configuration file for ssh.

      • Alan Labastida says:

        I found that is a undocumented option to, specified “from” (-f) and “to” (-t)

        “In all cases aside from remote-to-remote scenario the scp command processes command line options and then starts an SSH connection to the remote host. Another scp command is run on the remote side through that connection in either source or sink mode. Source mode reads files and sends them over to the other side, sink mode accepts them. Source and sink modes are triggered using -f (from) and -t (to) options, respectively. These options are for internal usage only and aren’t documented. There is also the 3rd hidden option, -d, when the target is expected to be a directory.”
        And this:

        “So, how does the transfer protocol actually works? If you forget about ssh, sshd and the connection between them and concentrate only on interaction between scp in “normal” mode and scp in the sink mode, you can see the scenario like this (if you copied from remote to local the remote scp command would have been run with -f option instead of -t, denoting the source mode):”

        • Ravi Saive says:


          Thanks for the detailed information about background process of ssh and scp, very helpful, let me go through it and come back to you..

  3. Almas says:

    I face most of the problems in Linux Network commands. What are the main questions related to Networking in ssh ?

  4. Surya Mohankumar says:

    in #6. How to add welcome/warning message as soon as a user login to SSH Server?
    the command nano/etc/issue is not working, any other solution for this…
    but i am using /etc/motd for welcome/warning message

    • Avishek Kumar says:

      Seems you have not installed nano editor.
      # vi /etc/issue
      [Note there is gap between vi and /etc]

  5. Markus says:

    At Debian systems the SSH config could be found at “/etc/ssh/sshd_config” not “/etc/ssh/ssh_config” this is the SSH-Client config!

  6. anon says:

    good one!

  7. naboj says:

    On Debian and most Debian-based systems like, Ubuntu the ssh server configuration is in /etc/ssh/sshd_config
    There are a lot of differences between Debian and Red Hat, but this is identical!

  8. Kai S says:

    Ref #6
    I would also like a message when i login, but I only get a message, maybe my configuration is wrong ;-)

    Ref #8
    A better way is
    grep “Failed password for” /var/log/secure
    because pipe will fork another process.

  9. BasketCase says:

    On #1 and #2, as has been said by others, the /etc/ssh/ssh_config file is the client configuration while /etc/ssh/sshd_config is the server configuration file. All distributions should have both. Debian is not special here.

    On #2 I prefer the without-password setting for PermitRootLogin. This disables password authentication for the root account but still allows root access via more secure authentication methods. Normally that means key authentication but it can also mean any other non-password authentication you have configured (such as the also previously mentioned Kerberos).

    On #4 you would only need to specify a key file to ssh-copy-id if the file is not one of the standard file names and is not loaded into an agent. Otherwise ssh-copy-id will authorize every key it can find. You should also mention how to manually authorize a key since servers often have password authentication disabled (something that should be an additional question) and therefore ssh-copy-id can’t get in to authorize your key(s).

    On #9 both sftp and rsync should also be mentioned. Both are actually superior to scp unless you need the rarely used scp -3 functionality.

  10. Jairusan says:

    Thank you Kumar, excellent article. One quick question, I was checking for the “/var/log/secure” file on my linux mint 17 Qiana and was not there. Is there a command or comment change I need to do to get SSH to start keeping logs about fail log in attempts.? Thank you in advance!

    • Jairusan says:

      Actually, I found out that in Debian based systems the “/var/log/secure” file is in “/var/log/auth.log” ^.^ Thank you!

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 150K+ Linux Users
  1. 100,756
  2. 5,113
  3. 36,418

Enter your email to get latest Linux Howto's