How to Transfer Files with SFTP
Short answerUse SFTP (SSH File Transfer Protocol) to your Linux VPS primary IP on port 22 (or your custom SSH port) with the same user/password or SSH key you use for SSH. FileZilla and the sftp/scp commands both work.
Overview
SFTP runs over SSH — it is not the old FTP protocol. On VPSGrid Linux VPS plans this is the normal way to upload site files, configs, and backups. Windows VPS users usually use RDP copy/paste, mapped drives, or WinSCP with other protocols depending on what you enable.
SSH basics: What Is SSH? · connection guide: Connect with SSH.
What you need
- Active Linux VPS and working SSH login
- Host: primary IP from Services → My Services
- Username: usually
rootor your sudo user - Port:
22unless you changed SSH - Password or private key
1) FileZilla (GUI)
- Install FileZilla Client from the official FileZilla site
- Open File → Site Manager → New Site
- Protocol: SFTP – SSH File Transfer Protocol
- Host: your primary IP
- Port:
22(or your custom SSH port) - Logon Type: Normal (password) or Key file
- User:
root(or your user) - Connect, trust the host key fingerprint on first connect if it matches your VPS
Left pane = your computer. Right pane = VPS. Drag files to upload/download.
2) Command-line SFTP
# Interactive session
sftp root@YOUR_PRIMARY_IP
# custom port example:
# sftp -P 2222 root@YOUR_PRIMARY_IP
# Inside sftp:
pwd
ls
cd /var/www
put localfile.txt
get remotefile.txt
exit3) Quick single-file copy with SCP
# upload
scp ./index.html root@YOUR_PRIMARY_IP:/var/www/example.com/
# download
scp root@YOUR_PRIMARY_IP:/var/log/nginx/access.log ./
# custom port
scp -P 2222 ./app.tgz root@YOUR_PRIMARY_IP:/root/4) Permissions tips
- Web roots often need the web server user to read files (for example
www-data/nginx) - Avoid
chmod 777on public directories - After upload, confirm ownership if the site cannot read new files
# example only — adjust user/group/path for your stack
chown -R www-data:www-data /var/www/example.com
find /var/www/example.com -type d -exec chmod 755 {} \;
find /var/www/example.com -type f -exec chmod 644 {} \;Frequently Asked Questions
Connection timed out
Confirm SSH works first. If SSH fails, SFTP will fail too — fix sshd/firewall or use the console.
Is SFTP the same as FTPS/FTP?
No. SFTP uses SSH. Classic FTP/FTPS are different services you would have to install and expose separately (usually unnecessary on a VPS).
Can I SFTP as a non-root user?
Yes — preferred for day-to-day uploads. Ensure that user can write to the target directories.
Related Articles
Need More Help?
Open a ticket at billing.vpsgrid.net with your service ID, primary IP, SFTP client name, and the exact error message.
¿Le ha resultado útil esta respuesta?