ERDA Windows Mount with WSL (v2) and SSHFS

ERDA Windows Mount with WSL (v2) and SSHFS
Slide Note
Embed
Share

Learn how to set up ERDA on Windows Subsystem for Linux with SSHFS for easy file access. Follow step-by-step instructions to install WSL, configure SSH keys, and mount ERDA securely. Enhance your workflow with seamless integration between ERDA and your WSL environment.

  • ERDA
  • WSL
  • SSHFS
  • Windows Subsystem for Linux
  • File Access

Uploaded on Mar 05, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. ERDA Windows mount with WSL (v2) and SSHFS Jesper Lykkegaard Karlsen DM coordinator, Science

  2. Install Windows-Subsystem-Linux (WSL) Open PowerShell Type: wsl --install This installes Ubuntu 22.04, which is default WSL Reboot after installation is done (do not try to start Ubuntu) Now start Ubuntu and setup primary user and password

  3. Install SSHFS Inside WSL shell run: sudo apt update sudo apt -y install sshfs

  4. SSH keys for easy validation (in WSL) Run this: ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_erda cat ~/.ssh/id_erda.pub Copy public SSH key to placeholder

  5. Insert SSH public keys in ERDA Login at https://www.erda.au.dk Click in bottom left corner Select Setup -> SFTP Pasta the inside the Public Keys box Maybe also set a password Click Save SFTP Settings

  6. erda_mount (script to mount ERDA in WSL) #!/bin/bash LOGIN=jelka@mbg.au.dk SOURCE="io.erda.au.dk:" MOUNT_DIR=~/erda SSH_OPTS="ssh -i ~/.ssh/id_erda -p 2222" MOUNT_OPTS="allow_other,reconnect,rw,idmap=user" cd ~/ if [ ! -d ${MOUNT_DIR} ]; then mkdir ${MOUNT_DIR} fi sshfs ${LOGIN}@${SOURCE} ${MOUNT_DIR} -o ${MOUNT_OPTS},ssh_command="${SSH_OPTS} EDIT at least LOGIN to fit needs and put in ~/bin/ in WSL

  7. erda_umount (script to un-mount ERDA) #!/bin/bash fusermount -u ~/erda EDIT to needs and put in ~/bin/ in WSL

  8. Make executable and mount ERDA (WSL) To make the erda_mount and erda_umount scripts excutable run: chmod 755 ~/bin/erda_* Add ~/bin to PATH echo export PATH= $HOME/bin:${PATH} >> ~/.bashrc To read/write inside ERDA mount from Windows, run this: sudo sed -i 's/\#user_allow_other/user_allow_other/g' /etc/fuse.conf Mount by typing: erda_mount Check that ERDA is mounted in ~/erda Un-mount ERDA: erda_umount

  9. Make shortcut of erda mount folder Enter Linux -> Ubuntu -> home -> USERNAME in Explorer Create shourtcut of the erda folder (e.g. drag folder to Desktop while holding down the Alt-key)

  10. Advanced Mount ERDA directly from Windows Copy the erda_mount script to erda_mount_ps in WSL cp -a bin/erda_mount bin/erda_mount_ps Edit erda_mount_ps (in WSL) and add this loop below text (keep running until ERDA is un- mounted): while df | grep ${MOUNT_DIR} >/dev/null; do sleep 5; done Make erda_mount.ps1 in PowerShell ISE containing this: wsl --cd ~ -- "bin/erda_mount_ps" Make erda_umount.ps1 script that calls erda_umount in WSL wsl --cd ~ -- "bin/erda_umount" Change explorer to open ps1 files with PowerShell as default Run this from an elevated Powershell: set-executionpolicy RemoteSigned choose Y(es)

Related


More Related Content