Setup Your Terminal to Access AiMos - cereal-d3v/LLM-ASR GitHub Wiki

SSH Configuration Setup for NLU

Once you have your NLU password, follow these steps to configure your SSH access:

  1. Check for an existing config file:

    • First, check if a .ssh/config file already exists by running:
    cat ~/.ssh/config
    
    • If you receive a no such file exists error, create the file using:
    touch ~/.ssh/config
    
    • Then follow the steps below.
  2. Open your terminal and navigate to the .ssh directory:

    cd ~/.ssh
    
  3. Edit the .ssh/config file using any text editor. vim is commonly used for terminal purposes. To open the file with vim, run:

    vim config
    
  4. Copy and paste the following content into your .ssh/config file. Make sure to replace the NLUGvlsz with your actual CCI account username (replace "NLUG(xxxx)" with your CCI account):

    Host cci01
        HostName blp01.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPath ~/.ssh/control:%h:%p:%r
        ControlPersist yes
    
    Host cci02
        HostName blp02.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPath ~/.ssh/control:%h:%p:%r
        ControlPersist yes
    
    Host cci03
        HostName blp03.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPath ~/.ssh/control:%h:%p:%r
        ControlPersist yes
    
    Host cci04
        HostName blp04.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPath ~/.ssh/control:%h:%p:%r
        ControlPersist yes
    
    Host fen01
        HostName dcsfen01.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci01
    
    Host fen02
        HostName dcsfen02.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci02
    
    Host fen03
        HostName dcsfen03.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci03
    
    Host fen04
        HostName dcsfen04.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci04
    
    Host npl01
        HostName nplfen01.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci01
    
    Host drp01
        HostName drpfen01.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci01
    
    Host drp02
        HostName drpfen02.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci02
    
    Host erp01
        HostName erpfen01.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci01
    
    Host erp02
        HostName erpfen02.ccni.rpi.edu
        User NLUGvlsz
        ControlMaster auto
        ControlPersist yes
        ControlPath ~/.ssh/control:%h:%p:%r
        ProxyCommand ssh -q -W %h:%p cci02
    
  5. Save and exit the editor. If using vim, type :wq and press Enter.

Once this is set up, you should be able to connect to the desired hosts using your CCI account credentials.

Alternative Solution Using the setup_ssh_config.sh Script

If you prefer an automated approach, you can use the setup_ssh_config.sh script available in this repository.

Steps to Use the Script:

  1. Make the script executable:

    In your terminal, run the following command to give the script execution permissions:

    chmod +x setup_ssh_config.sh
    
  2. Run the script:

    Once the script is executable, run it by typing:

    ./setup_ssh_config.sh
    

The script will guide you through the configuration process, prompting you for your NLUG (CCI) account username and setting up the necessary SSH configuration.

Accessing AiMos Files in VSCode

This guide will help you mount your AiMos home directory locally and access files directly through VSCode.

Installation

For Ubuntu/Debian

Install sshfs using:

sudo apt-get install sshfs

For macOS

Install macfuse and sshfs using Homebrew:

brew install macfuse sshfs

If you don’t have Homebrew installed, use this command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Setup

	1.	Create a main directory for your mount points:

mkdir ~/mounts
cd ~/mounts
mkdir home


	2.	Use sshfs to mount the desired directory. The usage pattern is:

sshfs [email protected]:/gpfs/u/home/NLUG/NLUGvlsz ~/mounts/cci-home -o follow_symlinks,allow_other
- replace (NLUG)vlsv with your appropriate NLUG account username.

	3.	To disconnect the mount, close any open files or editors and run:

sudo umount ~/mounts/home



SSH Multiplexing Revisited

If you’ve set up SSH multiplexing, you can avoid repeated authentication prompts when using sshfs. With SSH multiplexing configured, use:

sshfs cci01:/gpfs/u/home/NLUG/NLUGvlsv ~/mounts/home -o follow_symlinks

This command will use the existing SSH control socket, reducing the need for additional authentication.

Accessing Files in VSCode

To open the mounted directory directly in VSCode, use:

code ~/mounts/cci-home

This command will launch VSCode with the AiMos files accessible as if they were local files.

Simply copy this text and paste it into your GitHub wiki editor.