Forums

FTP for two pythonanywhere accounts

I recently got a client to sign up to pythonanywhere and create an account having developed and run the website on my account.

Initially I simply transferred a compressed file to their account without using FTP, and continued to update the CMS I was developing on my own account, however when I came to transfer that update it required the use of an FTP client as I have to do quite a complicated arrangement of uploads and doing it at the console would almost certainly result in human error.

However, when I added their FTP details to my FTP client (FileZilla on macOS) it would not connect. It did not give any error messages, after a while FileZilla just gave up and said "not connected" in the tab.

The settings are identical to the one used for my own account, just with the different username/passwords.

I tried repeated, the tab with my own Python Anywhere connection was working fine. In the end I restarted my Mac and after the reboot now neither will connect - not my own Python Anywhere account (which has had no changes) nor will the client's account connect.

Is there an issue with having two python anywhere accounts on one FTP client? I mean, I really don't see how this would be an issue, but I'm completely confused as to why adding a second one to my client would result in both being unable to connect? This is rather critical that I resolve this quickly because having recommended Python Anywhere to my client (especially following a disastrous experience they had with GoDaddy) I really don't want to tell them the updates are delayed because I'm unable to connect to the hosting.

Or is FTP currently down? I just tried connecting on my phone (which had successfully connected to the client's FTP via the DroidEdit app) and that's not working either...

Are you sure you used the correct password for your client's account? If you can't connect using either account it's possible that our system saw a bunch of failed logins for your client's account from your IP so it temporarily blocked it, which would have the effects you describe.

Also -- does the client have a paid account?

Yes I am definitely using the correct password, but it is possible I typoed it the first time and maybe I tried a bunch of times, so how many attempts are we talking about, it can't have been more than 5.

How long do I have to wait until I will be unbanned? If I give you my IP will that stop it?

The account is definintely a paid account, as I said, I have connected to it via FTP on my phone in the past (but that's not working now).

Ok, I turned off WiFi on my phone and could connect to their account on my cellular data connection (different IP) so it must be the IP ban.

The IP ban lasts an hour, and cuts in after about five attempts. (Hackers are persistent and determined, we sometimes get dozens of ssh login attempts per second.)

Does the client have access to the account themselves? Might they have changed the password without telling you?

Ah, sorry, our last messages must have crossed in the post. Definitely sounds like the few typoed logins triggering the IP ban were the problem, then.

No, I can connect to the account via FTP on my phone via my cellular connection, so the login details I have are correct.

However, when I then tethered my MacBook to my phone, it still fails to connect on either account.

And does attempting to reconnect aftering being blacklisted reset the 1 hour, or is it from the first offence.

Ie, if I attempt to reconnect after 15 minutes, will this then prolong the ban to an hour form then, or will it be from when it was first triggered?

I'm literally about to jump in front of a train, this is last thing I needed right now. I urgently need to get on this server right now and I'm at my wits end. I've now managed to get my phone IP blacklisted too, I don't know how, because I only tried to connect once (the wrong password must have been saved) - I can only assume the FTP client makes multiple attempts to connect when it fails, or maybe you've flagged the account for multiple attempts and are blacklisting IPs after only one failed connection?

I can't remember if I set the account password up with a capital or lower case letter, so if I get it wrong I just try the alternate and get in - but that should only use up one out of five lives so what gives? Is there no way to get my IP unblacklisted?

OK, in the end I managed to get it to work via the web upload interface and the console.

However, it would be very handy to have multiple file upload on the web interface and the ability to rename files (if that is already an option, I could not see how)

And does attempting to reconnect aftering being blacklisted reset the 1 hour, or is it from the first offence.

Ie, if I attempt to reconnect after 15 minutes, will this then prolong the ban to an hour form then, or will it be from when it was first triggered?

It's just from the first offence. We use a tool called fail2ban, which monitors failed login attempts and after a number of failures, it blocks the IP using the firewall -- so any further attempts don't get far enough to fail, and aren't counted.

However, it would be very handy to have multiple file upload on the web interface and the ability to rename files (if that is already an option, I could not see how)

Both of those are on our to-do list -- I've added upvotes on your behalf. The best solutions at the moment are:

  • Multiple files: zip them up and upload the zip. Then start a bash console, and run the unzip command from there.
  • Renaming: use the mv command in a bash console.

Those are definitely not ideal, but hopefully can save some time as a workaround.