GNU/Linux OS Configuration Tips

Some useful configuration notes and tips for the GNU/Linux operating system:

  • Spaces in the paths within fstab files
  • Date submitted: 19/06/2006 by Jim
  • To add an entry in the /etc/fstab file for a path that has a space use the \040 escape sequence

      //server/share\040with\040spaces /mnt/mount\040point  etc.....

    This would mount a windows share called "share with spaces" to a local directory called "/mnt/mount point" Note this could be used on a NFS, or even local mount point.

[ back to top ]

  • Simplify the distribution of SSH Public Keys
  • Date submitted: 10/04/2008 by Jim
  • The following command can be used to simplify the distribution of Public Keys for SSH.

      cat .ssh/id_dsa.pub | ssh <user>@<host> "cat >> .ssh/authorized_keys"

    The command:

    • Displays the current public key for the machine running the command on
    • Pipes this to the ssh command logging in as <user> on <host>
    • Which runs the command cat redirecting the piped through output to the .ssh/authorized_keys file

    Couple of notes:

    • This assumes that the ssh-keygen command has been run on the local machine to generate the Public/Private Key Pair
    • Make sure the >> redirector is used so the current authorized_keys file is added to, not overwritten
    • If you are running this to a host for the first time. The confirmation to accept the fingerprint is asked for

[ back to top ]