I Hate FTP [en]

[fr] Je hais le FTP. Donnez-moi un accès SSH et screen sur le serveur, et me voilà heureuse.

Ever since I discovered the magical combination of SSH + screen, I have come to loathe FTP. Although some of you will cringe at the idea, I like working directly on the server. No stray copies lying around, dated I-don’t-know-what. No chance of mistakenly overwriting your last set of changes.

Screen is a terminal multiplexer (just learned the term). What you do, basically, is climb inside it when you’re on the server, and do everything from there. The advantage is that:

  • when you disconnect your SSH connection, screen keeps running, so your workspace is how you left it next time you come in
  • you can have multiple “screens” (ie, terminal windows) you can easily switch around, so you can have your IRC channel running in one screen, be editing a file in another, etc. (basically, multi-tasking like you would do with windows in a graphical environment).

I learnt shell commands as I went along. Those I use the most are:

  • wget http://wordpress.org/latest.zip to download (instantly!) the latest version of WordPress directly on the server
  • unzip latest.zip to unzip it, still directly on the server
  • mv wp old-200910 to archive an old installation of wordpress (or move other files around)
  • cp -Rf plugins/* ../../wordpress/wp-content/plugins/ to copy all my plugins to the freshly unzipped install of WordPress
  • nano wp-config-sample.php to add my settings to the file and save it as wp-config.php

These are just a few examples. Once you know these commands and have them at the tip of your fingers, how fast you work is only limited by how fast you can type them. And you’re doing things directly on the web server. You’re not stuck looking at the “real world” (= the server) through the imperfect lens of an FTP client, waiting for uploads to happen (or downloads), paying attention not to overwrite stuff, having everything ready on your computer before pressing the magic button and hoping everything will be all right, because otherwise you’re in for another bout of download, edit, upload…

Some of my clients have WordPress installations on servers with no shell access. Obviously, I don’t have as much practice doing things the FTP way, but I swear it takes me 5 times as much time to do things with no SSH access. When you know how to use it, the command-line is wickedly fast.

The only situation where I actually do like FTP is when I’m using CSSEdit, because coupled to an FTP client, I can be editing my CSS file with the added power of the programme on my Mac, and have it upload and update the file on the server each time I hit save. Because yes, it’s nicer to write CSS in CSSEdit than in nano.

But for managing files and moving them around and minor edits… I’m much happier sitting on my server inside my screen.

Similar Posts:

Slow SSH Login from MacBook [en]

[fr] La connection SSH vers mon serveur depuis mon MacBook est très lente (je dois attendre plusieurs minutes pour qu'il me demande mon mot de passe). Il me semble me souvenir que depuis ma machine Windows à la maison également, il n'y avait rien de cela. L'autre semaine, j'ai essayé de me connecter depuis un tout autre endroit et la réponse a été instantanée. Idées?

Well, it seems that writing about my technical problems here is more efficient than bugging people repeatedly on IRC about them, so let’s continue. Welcome to Bunny’s Troublshooting Centre.

I have trouble SSH’ing into my server from my MacBook. Trouble, here, means I have to wait a couple of minutes (no exaggeration) for the password prompt. If I’m quick enough and type my password in before it times out, I’m in.

I logged in from somewhere else the other week and it responded almost immediately. I don’t recall that logging in from home (same wifi/DSL connection) from my winbox was sluggish.

Any ideas? I’ve run SSH with the verbose option on, and it does throw up a few warnings an errors. I don’t really want to paste it all here, but if you tell me what bits are useful I can put them in a pastebin. Thanks for any ideas/help/assistance.

Similar Posts: