When attempting SSH key authentication in MobaXTerm, you're encountering the error:
Warning: Identity file id_rsa not accessible: No such file or directory
MobaXTerm handles file paths differently than standard SSH clients. The executable's directory isn't automatically included in the path resolution. Here's what's happening:
debug1: Trying private key: /home/chip/.ssh/id_rsa
debug1: No more authentication methods to try
Instead of placing the key in MobaXTerm's installation directory, you should:
- Create a
.ssh
folder in your home directory (usuallyC:\Users\[YourUsername]\.ssh
) - Place your private key there with proper permissions
For most reliable operation with MobaXTerm:
# 1. Move your key to the standard location
mv id_rsa ~/.ssh/
# 2. Set proper permissions
chmod 600 ~/.ssh/id_rsa
# 3. Connect using either absolute path or default location
ssh -p 1111 -i "C:\\Users\\chip\\.ssh\\id_rsa" chip@192.168.0.100
If you must keep the key elsewhere, try these approaches:
# Using absolute path (Windows)
ssh -p 1111 -i "D:\\path\\to\\id_rsa" chip@192.168.0.100
# Using MobaXTerm's session settings (recommended):
1. Create a new SSH session
2. Specify the private key in the "Advanced SSH settings" tab
3. Save the session for future use
For thorough troubleshooting:
# Verbose output with exact path
ssh -vvv -p 1111 -i "full\\path\\to\\id_rsa" chip@192.168.0.100
# Check key permissions
ls -la ~/.ssh/
# Verify key format (if converted from PuTTY)
file ~/.ssh/id_rsa
Since you mentioned the key works in PuTTY, ensure proper conversion:
# Convert PPK to OpenSSH format using PuTTYgen
puttygen id_rsa.ppk -O private-openssh -o id_rsa
# Verify the conversion
ssh-keygen -l -f id_rsa
When trying to authenticate via SSH using a private key in MobaXTerm, you're encountering the error:
Warning: Identity file id_rsa not accessible: No such file or directory.
This occurs even though:
- The key works fine in PuTTY
- The key is placed in the same folder as MobaXTerm.exe
- The SSH command syntax appears correct
Unlike PuTTY which uses Windows path resolution, MobaXTerm's SSH client behaves more like a Linux environment. When you specify -i id_rsa
, it's looking for the key in /home/user/.ssh/
rather than the current Windows directory.
Solution 1: Absolute Path Specification
ssh -p 1111 -i "$(pwd)/id_rsa" chip@192.168.0.100
Solution 2: Proper Key Placement
mkdir -p ~/.ssh
cp id_rsa ~/.ssh/
chmod 600 ~/.ssh/id_rsa
ssh -p 1111 -i ~/.ssh/id_rsa chip@192.168.0.100
Solution 3: Key Conversion for MobaXTerm
If your key was originally in PuTTY's .ppk format:
# Convert PPK to OpenSSH format using MobaXTerm's built-in conversion:
puttygen id_rsa.ppk -O private-openssh -o id_rsa
For persistent issues, add verbose output:
ssh -vvv -p 1111 -i id_rsa chip@192.168.0.100
Check these common pitfalls:
- Windows file permissions (right-click → Properties → Security)
- Line endings (convert with
dos2unix id_rsa
) - SSH agent conflicts (
eval $(ssh-agent) && ssh-add ~/.ssh/id_rsa
)
Add to ~/.ssh/config
:
Host myserver
HostName 192.168.0.100
User chip
Port 1111
IdentityFile ~/.ssh/id_rsa
Then simply use:
ssh myserver