Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1355

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- ssh</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/ssh-2.1.2.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>SSH</strong><br><strong>Reference Manual</strong><br><small>Version 2.1.2</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li id="loadscrollpos" title="ssh " expanded="true">ssh<ul>
<li><a href="ssh.html">
                  Top of manual page
                </a></li>
<li title="close-1"><a href="ssh.html#close-1">close/1</a></li>
<li title="connect-3"><a href="ssh.html#connect-3">connect/3</a></li>
<li title="connect-4"><a href="ssh.html#connect-4">connect/4</a></li>
<li title="connection_info-2"><a href="ssh.html#connection_info-2">connection_info/2</a></li>
<li title="daemon-1"><a href="ssh.html#daemon-1">daemon/1</a></li>
<li title="daemon-2"><a href="ssh.html#daemon-2">daemon/2</a></li>
<li title="daemon-3"><a href="ssh.html#daemon-3">daemon/3</a></li>
<li title="shell-1"><a href="ssh.html#shell-1">shell/1</a></li>
<li title="shell-2"><a href="ssh.html#shell-2">shell/2</a></li>
<li title="shell-3"><a href="ssh.html#shell-3">shell/3</a></li>
<li title="start-0"><a href="ssh.html#start-0">start/0</a></li>
<li title="start-1"><a href="ssh.html#start-1">start/1</a></li>
<li title="stop-0"><a href="ssh.html#stop-0">stop/0</a></li>
<li title="stop_daemon-1"><a href="ssh.html#stop_daemon-1">stop_daemon/1</a></li>
<li title="stop_daemon-2"><a href="ssh.html#stop_daemon-2">stop_daemon/2</a></li>
<li title="stop_listener-1"><a href="ssh.html#stop_listener-1">stop_listener/1</a></li>
<li title="stop_listener-2"><a href="ssh.html#stop_listener-2">stop_listener/2</a></li>
</ul>
</li>
<li id="no" title="ssh_channel " expanded="false">ssh_channel<ul>
<li><a href="ssh_channel.html">
                  Top of manual page
                </a></li>
<li title="call-2"><a href="ssh_channel.html#call-2">call/2</a></li>
<li title="call-3"><a href="ssh_channel.html#call-3">call/3</a></li>
<li title="cast-2"><a href="ssh_channel.html#cast-2">cast/2</a></li>
<li title="enter_loop-1"><a href="ssh_channel.html#enter_loop-1">enter_loop/1</a></li>
<li title="init-1"><a href="ssh_channel.html#init-1">init/1</a></li>
<li title="reply-2"><a href="ssh_channel.html#reply-2">reply/2</a></li>
<li title="start-4"><a href="ssh_channel.html#start-4">start/4</a></li>
<li title="start_link-4"><a href="ssh_channel.html#start_link-4">start_link/4</a></li>
<li title="CallbackModule:code_change-3"><a href="ssh_channel.html#CallbackModule:code_change-3">CallbackModule:code_change/3</a></li>
<li title="CallbackModule:init-1"><a href="ssh_channel.html#CallbackModule:init-1">CallbackModule:init/1</a></li>
<li title="CallbackModule:handle_call-3"><a href="ssh_channel.html#CallbackModule:handle_call-3">CallbackModule:handle_call/3</a></li>
<li title="CallbackModule:handle_cast-2"><a href="ssh_channel.html#CallbackModule:handle_cast-2">CallbackModule:handle_cast/2</a></li>
<li title="CallbackModule:handle_msg-2"><a href="ssh_channel.html#CallbackModule:handle_msg-2">CallbackModule:handle_msg/2</a></li>
<li title="CallbackModule:handle_ssh_msg-2"><a href="ssh_channel.html#CallbackModule:handle_ssh_msg-2">CallbackModule:handle_ssh_msg/2</a></li>
<li title="CallbackModule:terminate-2"><a href="ssh_channel.html#CallbackModule:terminate-2">CallbackModule:terminate/2</a></li>
</ul>
</li>
<li id="no" title="ssh_connection " expanded="false">ssh_connection<ul>
<li><a href="ssh_connection.html">
                  Top of manual page
                </a></li>
<li title="adjust_window-3"><a href="ssh_connection.html#adjust_window-3">adjust_window/3</a></li>
<li title="close-2"><a href="ssh_connection.html#close-2">close/2</a></li>
<li title="exec-4"><a href="ssh_connection.html#exec-4">exec/4</a></li>
<li title="exit_status-3"><a href="ssh_connection.html#exit_status-3">exit_status/3</a></li>
<li title="reply_request-4"><a href="ssh_connection.html#reply_request-4">reply_request/4</a></li>
<li title="send-3"><a href="ssh_connection.html#send-3">send/3</a></li>
<li title="send-4"><a href="ssh_connection.html#send-4">send/4</a></li>
<li title="send-4"><a href="ssh_connection.html#send-4">send/4</a></li>
<li title="send-5"><a href="ssh_connection.html#send-5">send/5</a></li>
<li title="send_eof-2"><a href="ssh_connection.html#send_eof-2">send_eof/2</a></li>
<li title="session_channel-2"><a href="ssh_connection.html#session_channel-2">session_channel/2</a></li>
<li title="session_channel-4"><a href="ssh_connection.html#session_channel-4">session_channel/4</a></li>
<li title="setenv-5"><a href="ssh_connection.html#setenv-5">setenv/5</a></li>
<li title="shell-2"><a href="ssh_connection.html#shell-2">shell/2</a></li>
<li title="subsystem-4"><a href="ssh_connection.html#subsystem-4">subsystem/4</a></li>
</ul>
</li>
<li id="no" title="ssh_sftp " expanded="false">ssh_sftp<ul>
<li><a href="ssh_sftp.html">
                  Top of manual page
                </a></li>
<li title="start_channel-1"><a href="ssh_sftp.html#start_channel-1">start_channel/1</a></li>
<li title="start_channel-2"><a href="ssh_sftp.html#start_channel-2">start_channel/2</a></li>
<li title="start_channel-2"><a href="ssh_sftp.html#start_channel-2">start_channel/2</a></li>
<li title="start_channel-3"><a href="ssh_sftp.html#start_channel-3">start_channel/3</a></li>
<li title="stop_channel-1"><a href="ssh_sftp.html#stop_channel-1">stop_channel/1</a></li>
<li title="read_file-2"><a href="ssh_sftp.html#read_file-2">read_file/2</a></li>
<li title="read_file-3"><a href="ssh_sftp.html#read_file-3">read_file/3</a></li>
<li title="write_file-3"><a href="ssh_sftp.html#write_file-3">write_file/3</a></li>
<li title="write_file-4"><a href="ssh_sftp.html#write_file-4">write_file/4</a></li>
<li title="list_dir-2"><a href="ssh_sftp.html#list_dir-2">list_dir/2</a></li>
<li title="list_dir-3"><a href="ssh_sftp.html#list_dir-3">list_dir/3</a></li>
<li title="open-3"><a href="ssh_sftp.html#open-3">open/3</a></li>
<li title="open-4"><a href="ssh_sftp.html#open-4">open/4</a></li>
<li title="opendir-2"><a href="ssh_sftp.html#opendir-2">opendir/2</a></li>
<li title="opendir-3"><a href="ssh_sftp.html#opendir-3">opendir/3</a></li>
<li title="close-2"><a href="ssh_sftp.html#close-2">close/2</a></li>
<li title="close-3"><a href="ssh_sftp.html#close-3">close/3</a></li>
<li title="read-3"><a href="ssh_sftp.html#read-3">read/3</a></li>
<li title="read-4"><a href="ssh_sftp.html#read-4">read/4</a></li>
<li title="pread-4"><a href="ssh_sftp.html#pread-4">pread/4</a></li>
<li title="pread-5"><a href="ssh_sftp.html#pread-5">pread/5</a></li>
<li title="aread-3"><a href="ssh_sftp.html#aread-3">aread/3</a></li>
<li title="apread-4"><a href="ssh_sftp.html#apread-4">apread/4</a></li>
<li title="write-3"><a href="ssh_sftp.html#write-3">write/3</a></li>
<li title="write-4"><a href="ssh_sftp.html#write-4">write/4</a></li>
<li title="pwrite-4"><a href="ssh_sftp.html#pwrite-4">pwrite/4</a></li>
<li title="pwrite-5"><a href="ssh_sftp.html#pwrite-5">pwrite/5</a></li>
<li title="awrite-3"><a href="ssh_sftp.html#awrite-3">awrite/3</a></li>
<li title="apwrite-4"><a href="ssh_sftp.html#apwrite-4">apwrite/4</a></li>
<li title="position-3"><a href="ssh_sftp.html#position-3">position/3</a></li>
<li title="position-4"><a href="ssh_sftp.html#position-4">position/4</a></li>
<li title="read_file_info-2"><a href="ssh_sftp.html#read_file_info-2">read_file_info/2</a></li>
<li title="read_file_info-3"><a href="ssh_sftp.html#read_file_info-3">read_file_info/3</a></li>
<li title="read_link_info-2"><a href="ssh_sftp.html#read_link_info-2">read_link_info/2</a></li>
<li title="read_link_info-3"><a href="ssh_sftp.html#read_link_info-3">read_link_info/3</a></li>
<li title="write_file_info-3"><a href="ssh_sftp.html#write_file_info-3">write_file_info/3</a></li>
<li title="write_file_info-4"><a href="ssh_sftp.html#write_file_info-4">write_file_info/4</a></li>
<li title="read_link-2"><a href="ssh_sftp.html#read_link-2">read_link/2</a></li>
<li title="read_link-3"><a href="ssh_sftp.html#read_link-3">read_link/3</a></li>
<li title="make_symlink-3"><a href="ssh_sftp.html#make_symlink-3">make_symlink/3</a></li>
<li title="make_symlink-4"><a href="ssh_sftp.html#make_symlink-4">make_symlink/4</a></li>
<li title="rename-3"><a href="ssh_sftp.html#rename-3">rename/3</a></li>
<li title="rename-4"><a href="ssh_sftp.html#rename-4">rename/4</a></li>
<li title="delete-2"><a href="ssh_sftp.html#delete-2">delete/2</a></li>
<li title="delete-3"><a href="ssh_sftp.html#delete-3">delete/3</a></li>
<li title="make_dir-2"><a href="ssh_sftp.html#make_dir-2">make_dir/2</a></li>
<li title="make_dir-3"><a href="ssh_sftp.html#make_dir-3">make_dir/3</a></li>
<li title="del_dir-2"><a href="ssh_sftp.html#del_dir-2">del_dir/2</a></li>
<li title="del_dir-3"><a href="ssh_sftp.html#del_dir-3">del_dir/3</a></li>
</ul>
</li>
<li id="no" title="ssh_sftpd " expanded="false">ssh_sftpd<ul>
<li><a href="ssh_sftpd.html">
                  Top of manual page
                </a></li>
<li title="subsystem_spec-1"><a href="ssh_sftpd.html#subsystem_spec-1">subsystem_spec/1</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>ssh</h1></center>
  
  <h3>MODULE</h3>
<div class="REFBODY">ssh</div>
  <h3>MODULE SUMMARY</h3>
<div class="REFBODY">Main API of the SSH application</div>
  <h3>DESCRIPTION</h3>
<div class="REFBODY"><p>
    <p>Interface module for the SSH application. </p>
  </p></div>

   <h3><a name="id58243">SSH</a></h3>
<div class="REFBODY">
    

    <ul>
      <li>ssh requires the crypto and public_key applications.</li>
      <li>Supported SSH-version is 2.0 </li>
      <li>Currently supports only a minimum of mac and encryption algorithms i.e.
      hmac-sha1, and aes128-cb and 3des-cbc.</li>
    </ul>
 
  </div>
  
  <h3><a name="id61701">COMMON DATA TYPES </a></h3>
<div class="REFBODY">
    
    <p>Type definitions that are used more than once in
    this module:</p>
    <p><span class="code">boolean() = true | false </span></p>
    <p><span class="code">string() = list of ASCII characters</span></p>
    <p><span class="code">ssh_daemon_ref() - opaque to the user
    returned by ssh:daemon/[1,2,3]</span></p>
    <p><span class="code">ssh_connection_ref() - opaque to the user
    returned by ssh:connect/3</span></p>
    <p><span class="code">ip_address() - {N1,N2,N3,N4} % IPv4 |
    {K1,K2,K3,K4,K5,K6,K7,K8} % IPv6</span></p>
    <p><span class="code">subsystem_spec() = {subsystem_name(), {channel_callback(), channel_init_args()}} </span></p>  
    <p><span class="code">subsystem_name() = string() </span></p>
    <p><span class="code">channel_callback() = atom() - Name of the erlang module
    implementing the subsystem using the ssh_channel behavior see</span>
    <span class="bold_code"><a href="ssh_channel.html">ssh_channel(3)</a></span></p>
    <p><span class="code">channel_init_args() = list()</span></p>
 </div>
  
 <h3>EXPORTS</h3>
   
   <p><a name="close-1"><span class="bold_code">close(ConnectionRef) -&gt; ok </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code">ConnectionRef = ssh_connection_ref()</span><br>
</div>
      </div>
<div class="REFBODY"><p><p>Closes a ssh connection.</p> 
      </p></div>
    
    <p><a name="connect-3"><span class="bold_code">connect(Host, Port, Options) -&gt; </span></a><br><a name="connect-4"><span class="bold_code">connect(Host, Port, Options, Timeout) -&gt; {ok, ssh_connection_ref()}
      | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Host = string()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Port = integer()</span><br>
</div>
	<div class="REFBODY">The default is <span class="code">22</span>, the registered port for SSH.</div>
	<div class="REFTYPES">
<span class="bold_code">Options = [{Option, Value}]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Timeout = infinity | integer(milliseconds)</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Connects to an SSH server. No channel is started this is done
	by calling ssh_connect:session_channel/2.</p>
	<p>Options are:</p>
	<dl>
          <dt><strong><span class="code">{user_dir, string()}</span></strong></dt>
	  <dd>
	    <p>Sets the user directory e.i. the directory containing
	    ssh configuration files for the user such as
	    <span class="code">known_hosts</span>, <span class="code">id_rsa, id_dsa</span> and
	    <span class="code">authorized_key</span>. Defaults to the directory normally
	    referred to as <span class="code">~/.ssh</span> </p>
	  </dd>
	  <dt><strong><span class="code">{dsa_pass_phrase, string()}</span></strong></dt>
	  <dd>
	    <p>If the user dsa key is protected by a pass phrase it can be
	    supplied with this option.
	    </p>
	  </dd>
	  <dt><strong><span class="code">{rsa_pass_phrase, string()}</span></strong></dt>
	  <dd>
	    <p>If the user rsa key is protected by a pass phrase it can be
	    supplied with this option.
	    </p>
	  </dd>
          <dt><strong><span class="code">{silently_accept_hosts, boolean()}</span></strong></dt>
	  <dd>
	    <p>When true hosts are added to the
	    file <span class="code">known_hosts</span> without asking the user.
	    Defaults to false.
	    </p>
	  </dd>
	  <dt><strong><span class="code">{user_interaction, boolean()}</span></strong></dt>
	  <dd>
	    <p>If false disables the client to connect to the server
	    if any user interaction is needed such as accepting that
	    the server will be added to the <span class="code">known_hosts</span> file or
	    supplying a password. Defaults to true.
	    Even if user interaction is allowed it can be
	    suppressed by other options such as silently_accept_hosts and
	    password. Do note that it may not always be desirable to use
	    those options from a security point of view.</p>
	  </dd>
	  <dt><strong><span class="code">{public_key_alg, ssh_rsa | ssh_dsa}</span></strong></dt>
	  <dd>
            <p>Sets the preferred public key algorithm to use for user
	    authentication. If the the preferred algorithm fails of
	    some reason, the other algorithm is tried. The  default is
	    to try <span class="code">ssh_rsa</span> first.</p>
	  </dd>
	  <dt><strong><span class="code">{pref_public_key_algs, list()}</span></strong></dt>
	  <dd>
            <p>List of public key algorithms to try to use, ssh_rsa and ssh_dsa available. 
	    Will override <span class="code">{public_key_alg, ssh_rsa | ssh_dsa}</span></p>
	  </dd>
	  <dt><strong><span class="code">{connect_timeout, timeout()}</span></strong></dt>
	  <dd>
	    <p>Sets a timeout on the transport layer connection. Defaults to infinity.</p>
	  </dd>
	  <dt><strong><span class="code">{user, String}</span></strong></dt>
          <dd>
	    <p>Provide a user name. If this option is not given, ssh
	    reads from the environment (<span class="code">LOGNAME</span> or
	    <span class="code">USER</span> on unix,
	    <span class="code">USERNAME</span> on Windows).</p>
          </dd>
	  <dt><strong><span class="code">{password, string()}</span></strong></dt>
          <dd>
	    <p>Provide a password for password authentication.  If
	    this option is not given, the user will be asked for a
	    password if the password authentication method is
	    attempted.</p>
          </dd>
          <dt><strong><span class="code">{user_auth, Fun/3}</span></strong></dt>
          <dd>
	    <p>Provide a fun for password authentication. The fun
	    will be called as <span class="code">fun(User, Password, Opts)</span> and
	    should return <span class="code">true</span> or <span class="code">false</span>.</p>
	  </dd>
	  <dt><strong><span class="code">{key_cb, atom() = KeyCallbackModule}</span></strong></dt>
	  <dd>
	    <p>Provide a special call-back module for key handling.
	    The call-back module should be modeled after the
	    <span class="code">ssh_file</span> module. The functions that must
	    be exported are:
	    <span class="code">private_host_rsa_key/2</span>,
	    <span class="code">private_host_dsa_key/2</span>,
	    <span class="code">lookup_host_key/3</span> and
	    <span class="code">add_host_key/3</span>. This is considered
	    somewhat experimental and will be better documented later on.</p>
	  </dd>
	  <dt><strong><span class="code">{quiet_mode, atom() = boolean()}</span></strong></dt>
	  <dd>
	    <p>If true, the client will not print out anything on authorization.</p>
	  </dd>
	  <dt><strong><span class="code">{fd, file_descriptor()}</span></strong></dt>
	  <dd>
	    <p>Allow an existing file-descriptor to be used
	  (simply passed on to the transport protocol).</p>
</dd>
	  <dt><strong><span class="code">{ip_v6_disabled, boolean()}</span></strong></dt>
	  <dd>
	    <p>Determines if SSH shall use IPv6 or not.</p>
</dd>
	</dl>
      </p></div>

    <p><a name="connection_info-2"><span class="bold_code">connection_info(ConnectionRef, [Option]) -&gt;[{Option, Value}] </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Option = client_version | server_version | peer</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Value = term() </span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p> Retrieves information about a connection. 
	</p>
      </p></div>
    
    <p><a name="daemon-1"><span class="bold_code">daemon(Port) -&gt; </span></a><br><a name="daemon-2"><span class="bold_code">daemon(Port, Options) -&gt; </span></a><br><a name="daemon-3"><span class="bold_code">daemon(HostAddress, Port, Options) -&gt; ssh_daemon_ref()</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Port = integer()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">HostAddress = ip_address() | any</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Options = [{Option, Value}]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Option = atom()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Value = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Starts a server listening for SSH connections on the given port.</p>
      
        <p>Options are:</p>
        <dl>
	  <dt><strong><span class="code">{subsystems, [subsystem_spec()]</span></strong></dt>
	  <dd>
	    Provides specifications for handling of subsystems.  The
	    "sftp" subsystem-spec can be retrieved by calling
	    ssh_sftpd:subsystem_spec/1. If the subsystems option in not present
	    the value of <span class="code">[ssh_sftpd:subsystem_spec([])]</span> will be used.
	    It is of course possible to set the option to the empty list
	    if you do not want the daemon to run any subsystems at all.
	  </dd>
	  <dt><strong><span class="code">{shell, {Module, Function, Args} | fun(string() = User) - &gt; pid() |
	  fun(string() = User, ip_address() = PeerAddr) -&gt; pid()}</span></strong></dt>
	  <dd>
	    Defines the read-eval-print loop used when a shell is requested
	    by the client. Example use the
	    erlang shell: <span class="code">{shell, start, []}</span> which is
	    the default behavior.
	  </dd>
	  <dt><strong><span class="code">{ssh_cli,{channel_callback(), channel_init_args()}}</span></strong></dt>
	  <dd>
	    Provide your own cli implementation, e.i. a channel callback
	    module that implements a shell and command execution. Note
	    that you may customize the shell read-eval-print loop using the
	    option <span class="code">shell</span> which is much less work than implementing
	    your own cli channel.
	  </dd>
	  <dt><strong><span class="code">{user_dir, String}</span></strong></dt>
	  <dd>
	    <p>Sets the user directory e.i. the directory containing
	    ssh configuration files for the user such as
	    <span class="code">known_hosts</span>, <span class="code">id_rsa, id_dsa</span> and
	    <span class="code">authorized_key</span>. Defaults to the directory normally
	    referred to as <span class="code">~/.ssh</span> </p>
	  </dd>
          <dt><strong><span class="code">{system_dir, string()}</span></strong></dt>
          <dd>
            <p>Sets the system directory, containing the host files
            that identifies the host for ssh. The default is
            <span class="code">/etc/ssh</span>, note that SSH normally
            requires the host files there to be readable only by
	    root.</p>
	  </dd>
	  <dt><strong><span class="code">{auth_methods, string()}</span></strong></dt>
	  <dd>
	    <p>Comma separated string that determines which authentication methodes that the server
	    should support and in what order they will be tried. Defaults to
	    <span class="code">"publickey,keyboard_interactive,password"</span></p>
          </dd>
	  <dt><strong><span class="code">{user_passwords, [{string() = User, string() = Password}]}</span></strong></dt>
	  <dd>
            <p>Provide passwords for password authentication.They will
	    be used when someone tries to connect to the server and
	    public key user authentication fails. The option provides
	    a list of valid user names and the corresponding password.
	    </p>
          </dd>
          <dt><strong><span class="code">{password, string()}</span></strong></dt>
          <dd>
            <p>Provide a global password that will authenticate any
              user. From a security perspective this option makes
	      the server very vulnerable.</p>
	  </dd>
	  <dt><strong><span class="code">{pwdfun, fun/2}</span></strong></dt>
	  <dd>
	    <p>Provide a function for password validation. This is called
	      with user and password as strings, and should return
	      <span class="code">true</span> if the password is valid and
	      <span class="code">false</span> otherwise.</p>
	  </dd>
	  <dt><strong><span class="code">{fd, file_descriptor()}</span></strong></dt>
	  <dd>
	    <p>Allow an existing file-descriptor to be used
	  (simply passed on to the transport protocol).</p>
</dd>
	  <dt><strong><span class="code">{ip_v6_disabled, boolean()}</span></strong></dt>
	  <dd>
	    <p>Determines if SSH shall use IPv6 or not (only used when 
               HostAddress is set to any).</p>
</dd>
        </dl>
      </p></div>

    <p><a name="shell-1"><span class="bold_code">shell(Host) -&gt; </span></a><br><a name="shell-2"><span class="bold_code">shell(Host, Option) -&gt; </span></a><br><a name="shell-3"><span class="bold_code">shell(Host, Port, Option) -&gt; _</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code"> Host = string()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> Port = integer()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> Options - see ssh:connect/3</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Starts an interactive shell to an SSH server on the
	given <span class="code">Host</span>. The function waits for user input,
	and will not return until the remote shell is ended (e.g. on
	exit from the shell).
	</p>
      </p></div>

    <p><a name="start-0"><span class="bold_code">start() -&gt; </span></a><br><a name="start-1"><span class="bold_code">start(Type) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Type =  permanent | transient | temporary</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Reason = term() </span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Starts the Ssh application. Default type
          is temporary. See also
          <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','kernel','application.html');">application(3)</a></span>
	  Requires that the crypto application has been started.
	</p>
      </p></div>

    <p><a name="stop-0"><span class="bold_code">stop() -&gt; ok </span></a><br></p>
<div class="REFBODY"><p>
        <p>Stops the Ssh application. See also
          <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','kernel','application.html');">application(3)</a></span></p>
      </p></div>
    
    <p><a name="stop_daemon-1"><span class="bold_code">stop_daemon(DaemonRef) -&gt; </span></a><br><a name="stop_daemon-2"><span class="bold_code">stop_daemon(Address, Port) -&gt; ok </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code">DaemonRef = ssh_daemon_ref()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Address = ip_address()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Port = integer()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Stops the listener and all connections started by 
	the listener.</p>
      </p></div>

    <p><a name="stop_listener-1"><span class="bold_code">stop_listener(DaemonRef) -&gt; </span></a><br><a name="stop_listener-2"><span class="bold_code">stop_listener(Address, Port) -&gt; ok </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code">DaemonRef = ssh_daemon_ref()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Address = ip_address()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Port = integer()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Stops the listener, but leaves existing connections started
	by the listener up and running.</p>
      </p></div>

  
  
</div>
<div class="footer">
<hr>
<p>Copyright © 2005-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>