LogoLogo
  • Home
  • Getting Started
  • Configuration
    • LinuxGSM Config
    • Game Server Config
    • Start Parameters
    • cronjobs
    • Running on Boot
    • Running Multiple Game Servers
    • IP Address Configuration
    • LinuxGSM Stats
  • Commands
    • install
    • start-stop-restart
    • monitor
    • test-alert
    • console
    • debug
    • update
    • check-update
    • force-update
    • validate
    • update-lgsm
    • backup
    • map-compressor
    • details
    • mods
    • skeleton
    • fastdl
    • change-password
  • Game Servers
    • 7 Days to Die
    • Arma 3
    • ARK: Survival Evolved
    • Call of Duty 4
    • Dont Starve Together
    • Counter-Strike 2
    • Counter-Strike: Global Offensive
    • Factorio
    • Garry's Mod
    • Insurgency: SandStorm
    • Killing Floor 2
    • Minecraft: Java Edition
    • Multi Theft Auto
    • Rust
    • Sven Co-op
    • Trackmania Nations Forever / Trackmania United Forever
    • TeamSpeak 3
    • Unreal Tournament 99
    • Unreal Tournament 2004
    • Unreal Tournament 3
    • Valheim
    • Xonotic
    • The Front [WIP]
  • Networking
    • IP Address
    • Ports
    • Source Engine
  • Alerts
    • Discord
    • Email
    • IFTTT
    • Pushbullet
    • Pushover
    • Rocket.Chat
    • Slack
    • Telegram
  • Dependencies
    • Java
    • tmux
    • jq
    • gamedig
    • glibc
  • Features
    • ANSI Colors
    • Stop Mode
    • Log Management
    • Message Display Time
  • SteamCMD
    • Steam Master Server
    • Game Server Login Token
    • Branch
    • LAN Discovery
    • Workshop
    • Error Codes
  • Linux
    • distro
    • ftp-scp
    • file-ownership
    • firewalls
    • network-interfaces
    • permissions
    • Symlinking and ln command
  • Troubleshooting
  • FAQ
  • Guides
    • Security
    • Make Webserver Case Insensitive
    • Sourcemod and Metamod:Source
  • Other
    • server-migration
    • basic-usage
    • brand
Powered by GitBook
On this page
  • SFTP Advantages
  • How to use SFTP
  • Bad practice to avoid
  • By all means, you should never
Edit on GitHub
Export as PDF
  1. Linux

ftp-scp

SFTP (Secure File Transfer Protocol) is the transfer protocol to view and transfer files over SSH. SFTP works the same as FTP but is encrypted.

SFTP Advantages

  • Encrypted

  • Nothing extra to install (such as FTP server)

  • Works like any other FTP server

  • Compatible with the popular clients such as Filezilla and WinSCP

  • You can login to any SSH accessable Linux user.

How to use SFTP

  • Connect like any FTP except it uses the port (default 22)

  • Use your linux username / password

  • You might need to set protocol to SFTP in your FTP client.

Bad practice to avoid

By all means, you should never

  1. Connect to a server as root.

  2. Use FTP if SFTP is available.

Root login to an FTP

Here is why you shouldn't

  • By logging in as root, you might accidentally remove essential system files or put useless files into the wrong place and mess up with your system.

  • But even more annoying, any file you'll write will belong to root, and the user won't be able to either read, change, or execute writtent files as root.

  • FTP is an unencrypted protocol, therefore it is very unsecure to edit sensitive files using it.

How to operate without root FTP login ?

  • If you need to edit system config files, then do like everyone else : use an SSH text editor like "nano" or "vi".

  • Set your FTP so that you can login as users with a valid shell from the machine. Eventually, disable root FTP login.

  • Oh, one more thing... Did we talk about SFTP ?

PreviousdistroNextfile-ownership

Last updated 6 years ago