10.07.2015 Views

Pine, IMAP, and SSH (SSH, The Secure Shell: The Definitive Gu...

Pine, IMAP, and SSH (SSH, The Secure Shell: The Definitive Gu...

Pine, IMAP, and SSH (SSH, The Secure Shell: The Definitive Gu...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Pine</strong>, <strong>IMAP</strong>, <strong>and</strong> <strong>SSH</strong> (<strong>SSH</strong>, <strong>The</strong> <strong>Secure</strong> <strong>Shell</strong>: <strong>The</strong> <strong>Definitive</strong> <strong>Gu</strong>ide)of 8http://www.hn.edu.cn/book/NetWork/NetworkingBookshelf_2ndEd/ssh...8/3/2005 2:16 PM11.3.1.2. Making <strong>Pine</strong> use <strong>SSH</strong> instead of rsh<strong>Pine</strong>'s rsh feature is controlled by three configuration variables in the ~/.pinerc file: rsh-path, rsh-comm<strong>and</strong>,<strong>and</strong> rsh-open-timeout. rsh-path stores the program name for opening a Unix remote shell connection.Normally it is the fully qualified path to the rsh executable (e.g., /usr/ucb/rsh). To make <strong>Pine</strong> use <strong>SSH</strong>,instruct it to use the ssh client rather than rsh, setting rsh-path to the location of the <strong>SSH</strong> client:rsh-path=/usr/local/bin/sshrsh-comm<strong>and</strong> represents the Unix comm<strong>and</strong> line for opening the remote shell connection: in this case, the<strong>IMAP</strong> connection to the <strong>IMAP</strong> host. <strong>The</strong> value is a printf-style format string with four "%s" conversionspecifications that are automatically filled in at runtime. From first to last, these four specifications st<strong>and</strong> for:1.2.3.4.<strong>The</strong> value of rsh-path<strong>The</strong> remote hostname<strong>The</strong> username for accessing your remote mailbox<strong>The</strong> connection method; in this case, "imap"For example, the default value of rsh-comm<strong>and</strong>is:"%s %s -l %s exec /etc/r%sd"which can instantiate to:/usr/ucb/rsh imap.example.com -l smith exec /etc/rimapdTo make this work properly with ssh, modify the default format string slightly, adding the -q option for quietmode:rsh-comm<strong>and</strong>="%s %s -q -l %s exec /etc/r%sd"This instantiates to:/usr/local/bin/ssh imap.example.com -w -l smith exec /etc/rimapd<strong>The</strong> -q option is necessary so that ssh doesn't emit diagnostic messages that may confuse <strong>Pine</strong>, such as:Warning: Kerberos authentication disabled in SUID client.fwd connect from localhost to local port sshdfwd-2001<strong>Pine</strong> otherwise tries to interpret these as part of the <strong>IMAP</strong> protocol. <strong>The</strong> default <strong>IMAP</strong> server location of/etc/r %sd becomes /etc/rimapd.<strong>The</strong> third variable, rsh-open-timeout, sets the number of seconds for <strong>Pine</strong> to open the remote shellconnection. Leave this setting at its default value, 15, but any integer greater than or equal to 5 is permissible.So finally, the <strong>Pine</strong> configuration is:rsh-path=/usr/local/bin/sshrsh-comm<strong>and</strong>="%s %s -q -l %s exec /etc/r%sd"rsh-open-timeout=

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!