GOAL

An easy solution for users to login to Fermi kerberized computers via ssh.
Solution uses Vagrant to provision a VirtualBox VM that provides kerberized ssh.

-------------------------------------------------------------------------------


# fermi-kerberized-ssh

This repository has a "Vagrantfile" for building an equivalent to SLF6 as a Virtual Machine suitable for access to Fermi kerberized computers via ssh. 

## Features

Installed with this VM are:

   openssh 
   kerberos config file for Fermi 

## Main Installation of base products

Note that the installation requires some downloads from Fermi and other sites.

0)   Tested Vagrant vs VirtualBox Version Matrix 

     Host OS 	   Vagrant   VirtualBox   Status
     -------   	   -------   ----------	  ------
     Windows 10     1.8.4 	5.0.26    Fails   
     Windows 10     1.8.5 	5.1.4     Works   
    
1)
  Download and install Vagrant from https://www.vagrantup.com/downloads.html

  NOTE NOTE NOTE
  NOTE NOTE NOTE

 	 Vagrant 1.8.4 does not work at all on Windows 10.  So you will
	 have to use Vagrant 1.8.5, and patch it, until Vagrant 1.8.6 is 
         released. 

	   Download Vagrant 1.8.5 .
	   Install Vagrant 1.8.5 in the default location.
           Download  getvagrantpatch.bat which patches Vagrant 1.8.5
             http://sldist.fnal.gov/linux/fermi/contrib/vagrant/fermi-kerberized-ssh/vagrant185patch/getvagrantpatch.bat
           Run the getvagrantpatch.bat file to add patch to 1.8.5
  
  NOTE NOTE NOTE
  NOTE NOTE NOTE

2)

  Download and install VirtualBox from http://www.virtualbox.org/
  Download and install VirtualBox extentions from http://www.virtualbox.org/

       VirtualBox 5.1.x is available from           
          http://www.virtualbox.org                 

3)

  Suggest that you make a directory for just this Vagrant install
  Change to that directory .

4)
  
  Download the customized "fermi-kerberized-ssh" Vagrant config file from 

   http://sldist.fnal.gov/linux/fermi/contrib/vagrant/fermi-kerberized-ssh/Vagrantfile  

5)

## Provision Virtual box using Vagrant via the "command line"

  Provisioning means to install and configure the VM to make it usable for 
  what you want to do.

  Bring up the VM with provisioning (it may take many minutes to run)

  This will update to latest versions of packages.  
  Add/Update Virtual Box Guest Additons.  
  Turn off not needed network services.  
  Kerberize ssh.

     Select "command line"
     Change to directory where you downloaded the 'Vagrantfile" to.
     'vagrant up'

  The virtual machine is now provisioned. 

6)

## LOGIN 

  TO LOGIN 

   Start up your VirtualBox App (the GUI). Locate your new VM (called `fermi-kerberized-ssh` ). 
   Start the VM called "fermi-kerberized-ssh"
   Login via user  'vagrant' , password 'vagrant' 
   kinit "your kerberos principal"
       enter your password
   ssh <your kerberos principal>@<fermi kerberized computer running sshd that you have access to>
       ssh myuser@somecomputer.fnal.gov

7)

## SHUTDOWN


     Exit from the "vagrant ssh" with "exit"

     Bring down VirtualBox gui VM `fermi-kerberized-ssh`
