title: How do I get lftp to use SSL/TLS security mechanism from the command line?
body: <p>I'm trying to log into an <code>ftps</code> site. I've tried giving the login creds at the command line (and putting <code>set</code> parameters in <code>~/.lftprc</code>, then opening an <code>lftp</code> session and typing those parameters with <code>lftp</code> job control statements. Regardless, I keep hitting the same roadblock:</p>
  
  <pre><code> 421 Sorry, cleartext sessions are not accepted on this server.
   Please reconnect using SSL/TLS security mechanisms.
  </code></pre>
  
  <p>I got furthest with the following parameters, but keep getting the error above. </p>
  
  <p><strong>How do I get <code>lftp</code> to use SSL/TLS security mechanism from the command line?</strong></p>
  
  <p>The objective is to script the access to this ftps site using bash (programming without using <code>expect</code>).</p>
  
  <pre><code> lftp
   lftp :~&gt; set ssl-allow false
   lftp :~&gt; set passive-mode yes
   lftp :~&gt; open ftp.abc.com
   lftp ftp.abc.com:~&gt; login theuser
   Password:
   lftp theuser@ftp.abc.com:~&gt; cd
    `cd' at 0 [Delaying before reconnect: 26]
   CTRL-C
   lftp theuser@ftp.abc.com:~&gt; debug
   lftp theuser@ftp.abc.com:~&gt; cd
   ---- Connecting to ftp.abc.com (XX.XXX.XX.XX) port 21
   &lt;--- 220-Welcome to the Yahoo! Web Hosting FTP server
   &lt;--- 220-Need help? Get all details at:
   &lt;--- 220-http://help.yahoo.com/help/us/webhosting/gftp/
   &lt;--- 220-
   &lt;--- 220-No anonymous logins accepted.
   &lt;--- 220-Yahoo!
   &lt;--- 220-Local time is now 15:30. Server port: 21.
   &lt;--- 220-This is a private system - No anonymous login
   &lt;--- 220 You will be disconnected after 5 minutes of inactivity.
   ---&gt; FEAT
   &lt;--- 211-Extensions supported:
   &lt;---  EPRT
   &lt;---  IDLE
   &lt;---  MDTM
   &lt;---  SIZE
   &lt;---  MFMT
   &lt;---  REST STREAM
   &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
   &lt;---  MLSD
   &lt;---  XDBG
   &lt;---  AUTH TLS
   &lt;---  PBSZ
   &lt;---  PROT
   &lt;---  TVFS
   &lt;---  ESTA
   &lt;---  PASV
   &lt;---  EPSV
   &lt;---  SPSV
   &lt;---  ESTP
   &lt;--- 211 End.
   ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
   &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
   ---&gt; USER theuser
   &lt;--- 421 Sorry, cleartext sessions are not accepted on this server.
   Please reconnect using SSL/TLS security mechanisms.
  </code></pre>