I try to create FTP connection via Tramp, but the output I get on AngeFTP is:

ftp> open android.local
ftp: Can't connect to `': Connection refused
ftp: Can't connect to `android.local:ftp'

I have tried many different options, but nothing works. SFTP works fine, but I can't get FTP working. Here is my config:

/etc/hosts android.local


machine android.local
    login foo
    password foo
    port 2221


(set-register ?a (cons 'file "/ftp:[email protected]:#2221:/storage/0123-4567"))

Any ideas?

EDIT: I was able to connect via ftp client from the terminal (outside Tramp) with the command ftp ftp://foo:[email protected]:2221, but can't replicate that via Tramp.

  • 1
    "I try to create FTP connection via Trump" ... that's not possible anymore since Jan 20th. Jan 30, 2021 at 18:43
  • Seriously: your FTP server seems to be located on an Android device. Are you able to connect with a vanilla FTP client, from a shell? And, btw, I'm not sure that Ange-FTP is able to read multiple line .netrc entries. Jan 30, 2021 at 18:44
  • @MichaelAlbinus yes, I found it best, OS agnostic way to transfer files to Android devices. I used to use FileZilla for this, but it would be easier by just using Tramp. Obviously you need FTP server app.
    – Navidot
    Jan 31, 2021 at 9:49
  • Honestly, this needs debugging. Not possible on SX. Pls contact us via the [email protected] ML. Jan 31, 2021 at 14:30
  • Ok. Can you tell what I should put into the message, if the copy of this post will be sufficient?
    – Navidot
    Jan 31, 2021 at 16:08

1 Answer 1


There is a syntax error in the example. "/ftp:[email protected]:#2221:/storage/0123-4567" must be "/ftp:[email protected]#2221:/storage/0123-4567".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.