Setting Up SFTP Access for Multiple Users
SFTP (SSH File Transfer Protocol) is a secure way to transfer files between your local computer and your Ruachost hosting account. Unlike FTP, SFTP encrypts both commands and data, protecting your credentials and files during transfer.
By default, a shared hosting account only includes one SSH login (your main cPanel/hosting username). This can be limiting if you want to give multiple users secure file transfer access without sharing your main password. The solution is to set up individual SSH key pairs for each user.
Why Use SFTP Instead of FTP?
Section titled “Why Use SFTP Instead of FTP?”- Security: All traffic is encrypted.
- No password sharing: Each user can have their own SSH key.
- Granular access: You can restrict users to specific directories.
- Compatibility: Works with most FTP clients (FileZilla, Cyberduck, WinSCP).
Steps to Set Up SFTP for Multiple Users
Section titled “Steps to Set Up SFTP for Multiple Users”Step 1: Generate an SSH Key Pair for Each User
Section titled “Step 1: Generate an SSH Key Pair for Each User”Each user should generate their own SSH key pair on their local machine.
-
Linux/macOS:
ssh-keygen -t rsa -b 4096This creates a private key (
id_rsa) and a public key (id_rsa.pub) in~/.ssh/. -
Windows: Use PuTTYgen or OpenSSH in PowerShell to generate keys.
⚠️ Important: The private key stays with the user. Only the public key is uploaded to Ruachost.Step 2: Deploy the Public Key to Ruachost
Section titled “Step 2: Deploy the Public Key to Ruachost”- Log in to your Ruachost Hosting Panel.
- Navigate to Security → SSH Access.
- Add the user’s public key (
id_rsa.pub) to the authorized keys. - Assign the user to the appropriate directory (optional, for restricted access).
Step 3: Configure the FTP Client
Section titled “Step 3: Configure the FTP Client”Each user must configure their FTP client to use their private key.
Example: FileZilla
Section titled “Example: FileZilla”-
Open FileZilla.
-
Go to Edit → Settings → Connection → SFTP.
-
Click Add key file and select the private key (
id_rsa).- If prompted, FileZilla will convert the key into a supported format.
-
Go to File → Site Manager.
-
Create a new site entry:
- Host: (or server IP)
- Port: 22 (or custom SSH port, e.g., 7822)
- Protocol: SFTP – SSH File Transfer Protocol
- Logon Type: Normal
- User: your Ruachost username
- Password: leave blank (since you’re using keys)
-
Click Connect.
Security Tips
Section titled “Security Tips”- Never share your private key.
- Use a passphrase when generating keys for extra protection.
- Remove unused keys from your Ruachost account to prevent unauthorized access.
- Consider restricting users to specific directories if they don’t need full access.