Step-by-step guide to connect to a remote machine using MobaXterm or PuTTY on Windows, including file transfers and running commands (e.g., Quantum ESPRESSO):
- Download the Portable Edition (free) from https://mobaxterm.mobatek.net.
- Extract the ZIP file and run
MobaXterm.exe.
- Start a New Session:
- Click Session → SSH.
- Enter:
- Remote host:
your_remote_server_ip_or_hostname - Username: Your remote server username.
- Port:
22(default for SSH).
- Remote host:
- Click OK.
- Authenticate:
- Enter your password when prompted.
- (Optional) Use SSH keys (see SSH Key Setup below).
- Integrated File Browser:
- After connecting, MobaXterm shows the remote file system on the left pane.
- Drag-and-drop files between your local Windows system and the remote server.
- SCP/SFTP Commands:
Use the terminal to run:# Upload to remote scp local_file.txt username@remote_host:/path/to/destination # Download from remote scp username@remote_host:/path/to/remote_file.txt .
- Download from https://www.putty.org.
- Install using the
.msiinstaller (default settings).
- Configure PuTTY:
- Open PuTTY.
- Under Session:
- Host Name:
username@remote_host - Port:
22 - Connection Type:
SSH.
- Host Name:
- Save the session for future use (type a name under Saved Sessions → Save).
- Authenticate:
- Click Open and enter your password.
- Using PSCP (Command Line):
- Download
pscp.exefrom PuTTY’s website. - Open Command Prompt and run:
# Upload to remote pscp C:\local_file.txt username@remote_host:/remote/path # Download from remote pscp username@remote_host:/remote/path/file.txt C:\Downloads
- Download
- Using WinSCP (GUI):
- Install WinSCP.
- Connect via SFTP/SCP and drag files between local/remote systems.
- Generate Keys:
In MobaXterm/PuTTY:ssh-keygen -t rsa # Save to ~/.ssh/id_rsa (no passphrase if desired) - Copy Public Key to Remote:
ssh-copy-id username@remote_host
- Test Login:
ssh username@remote_host # Should connect without a password
- Connection Refused:
- Verify the remote server’s IP/port and SSH service status (
sudo systemctl status sshd).
- Verify the remote server’s IP/port and SSH service status (
- Permission Denied:
- Check SSH key permissions:
chmod 600 ~/.ssh/id_rsa
- Check SSH key permissions:
- File Transfer Errors:
- Use absolute paths (e.g.,
/home/username/datainstead of~/data).
- Use absolute paths (e.g.,
- MobaXterm Advantages: Built-in SFTP, X11 forwarding for GUIs, and tabbed sessions.
- PuTTY + WinSCP: Lightweight but requires separate tools for file transfers.
- Remote QE Execution: Ensure QE is installed on the remote machine and MPI is configured.