A Generic Linux system is available for you to use at IP address 138.28.162.108.
If your team will be developing it team project on Linux please ask the instructor to create a new Linux instance for your team to share (it will have a new IP address).
Each of you has a Linux account on this system:
- Username: Your Kenyon username (the part of your email before the ‘@’).
- Password: Your student ID (starting with a capital ‘S’).
Logging into Your Account
On macOS:
- Open a Terminal:
- You can find Terminal in
Applications > Utilities > Terminal.
- You can find Terminal in
- Connect via SSH:
ssh yourusername@138.28.162.108- Replace
yourusernamewith your Kenyon username. - When prompted, enter your password (your student ID starting with ‘S’).
- Replace
- Generate an SSH Key: To simplify future logins and to enable secure access to GitHub, create an SSH key:
- Run the following command to generate a 4096-bit RSA key:
ssh-keygen -t rsa -b 4096 -C "your_email@kenyon.edu" - When prompted, press
Enterto save the key in the default location. - You can add a passphrase or leave it empty.
- Run the following command to generate a 4096-bit RSA key:
- Add SSH Key to the SSH Agent:
eval "$(ssh-agent -s)"ssh-add ~/.ssh/id_rsa - Add Your SSH Key to GitHub:
- Display the public key content:
cat ~/.ssh/id_rsa.pub - Copy the output.
- Go to GitHub’s SSH settings (log in if necessary).
- Click on New SSH key, give it a title (e.g., “Kenyon Linux Server”), and paste your public key. Click Add SSH key.
- Display the public key content:
- You can now ust git commands to clone, add, pull, push etc.
Using VSCode to Edit Remotely
- Install Remote Development Extensions:
- Open Visual Studio Code (VSCode).
- Go to the Extensions view (
View > Extensionsor pressCmd+Shift+X). - Search for Remote – SSH and install it.
- Configure VSCode for Remote SSH Access:
- Open the Command Palette (
Cmd+Shift+P). - Type
Remote-SSH: Connect to Host...and select it. - Enter the SSH connection string:plaintextCopy code
yourusername@138.28.162.108 - When prompted, enter your password or passphrase for the SSH key if configured.
- Now you can open and edit files directly on the server through VSCode.
- Open the Command Palette (
Editing with Nano on Linux
You can edit files directly in the terminal using the nano editor:
nano filename
- Press
Ctrl + Xto save and exit.
On Windows 11 (Using Cygwin):
- Install Cygwin (If Not Installed):
- Download Cygwin from https://www.cygwin.com/.
- During installation, include the OpenSSH package.
- Open Cygwin Terminal.
- Connect via SSH:bashCopy code
ssh yourusername@138.28.162.108- Replace
yourusernamewith your Kenyon username. - Enter your password (your student ID with ‘S’) when prompted.
- Replace
- Generate an SSH Key (Same Steps as Above):
ssh-keygen -t rsa -b 4096 -C "your_email@kenyon.edu"eval "$(ssh-agent -s)"ssh-add ~/.ssh/id_rsa - Add the SSH Key to GitHub:
- Copy the SSH key using:
cat ~/.ssh/id_rsa.pub - Go to GitHub SSH settings and add the key as described above.
- Copy the SSH key using:
- You can now ust git commands to clone, add, pull, push etc.
Setting Up VSCode for Remote Editing
- Install Remote Development Extensions:
- In VSCode, go to the Extensions view (
Ctrl+Shift+X). - Search for Remote – SSH and install it.
- In VSCode, go to the Extensions view (
- Configure VSCode to Connect Remotely:
- Open the Command Palette (
Ctrl+Shift+P). - Type
Remote-SSH: Connect to Host...and select it. - Enter:
yourusername@138.28.162.108 - When prompted, enter your password or SSH key passphrase.
- You can now open, edit, and manage files on the Linux server through VSCode.
- Open the Command Palette (
Additional Tips
- Cloning GitHub Repositories: After setting up SSH access, you can clone repositories securely:
git clone git@github.com:username/repository.gitReplaceusernameandrepositorywith the relevant GitHub details. - Executing Linux Commands: Familiarize yourself with basic Linux commands like
ls(list files),cd(change directory),cp(copy files), andmv(move/rename files).
This setup provides you with a secure and efficient way to work on projects hosted on the Kenyon Linux server, including using Git, editing code, and performing remote development tasks.
