How to setup FTP so that php can connect securely, but no other connections allowed.

Discussion in 'General Server' started by skunkbad, Jan 11, 2012.

  1. skunkbad

    skunkbad New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I'm trying to make a connection to an external server. The server administrator wants to know how I intend to make an FTP connection (SSH, SSL, etc).

    I intend to use php's ftp_ssl_connect() function, because the FTP activity is part of a website.

    I know the external server is CentOS, and I don't really have any other details. Should I just tell him that the connection is plain SSL? Will it still be port 21?

    The reason why I ask is that my FTP client has multiple encryption options (FTPeS, FTPiS, SFTP), so I just want to be sure that I'm telling him the right thing so I don't waste our employer's time.

  2. Rob

    Rob Administrator Staff Member

    Messages:
    575
    Likes Received:
    229
    Trophy Points:
    43
    Hey skunkbad - welcome to LinuxForum!

    ftp_ssl_connect will connect to the remote server on their ftp port.. defaults to 21 but you can specify it in your script.

    If connecting to their server with an ftp client, you can use ftps/ftpes/ftp-ssl..

    The remote server will want to make sure they have ssl built into their ftp server..

    Can you use ssh_connect instead? That will be secure and will connect to port 22.

    Rob
  3. skunkbad

    skunkbad New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    The scripts that are transferring files via ftp are setup to use the ftp_ssl_connect() function, so that's why I was a****g about that. I'd prefer not to have to change anything at this point. So, it sounds like the server admin just needs to make sure the ftp is set up with standard SSL, right?
  4. Rob

    Rob Administrator Staff Member

    Messages:
    575
    Likes Received:
    229
    Trophy Points:
    43
    Correct, sorry, did not see this reply..
  5. diegosuse

    diegosuse New Member

    Messages:
    65
    Likes Received:
    3
    Trophy Points:
    0
    I'll do in the easiest way. Aak your ftp admin to include your public ip on the conf of the fyp server with the unique protocol you will use. Hope helps
  6. diegosuse

    diegosuse New Member

    Messages:
    65
    Likes Received:
    3
    Trophy Points:
    0
    Buy the way. Ask for a different public port to increase your security. And deny everything else
  7. Famous

    Famous New Member

    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    0
    Google Filezilla and download the software it should help you out..

Share This Page