anchor.diff:  						 (throw-last-error (session ssh)))
   			(when agent 
   				(agent-free agent)))))
  +
  +(defun make-publickey-auth (login directory private-key-name &optional (password ""))
  +	(let ((private-key 
  +				 (namestring (make-pathname :directory directory
  +																		:name private-key-name)))
  +				(public-key 
  +				 (namestring (make-pathname :directory directory
  +																		:name private-key-name
  +																		:type "pub"))))
  +		(make-instance 'auth-publickey 
  +									 :login       login
  +									 :public-key  public-key
  +									 :private-key private-key
  +									 :password    password)))
  +
  +(defun make-agent-login (login)
  +	(make-instance 'auth-agent 
  +								 :login login))
  +
  +(defun make-password-login (login password)
  +	(make-instance 'auth-password 
  +								 :login    login
  +								 :password password))
   
   (defvar *ssh-channel-buffer-size* 1400)
   
  
positive.code: 								:initform nil
  								:accessor auth-passed)))
  
  (defun  throw-last-error (session)
  	(multiple-value-bind (message code)
  			(session-last-error session)
  		(error 'ssh-generic-error 
  					 :message message
  					 :code    code)))
  	 
  (defmacro with-last-error ((session error-type) &rest args)
  	`(multiple-value-bind (message code)
  			 (session-last-error ,session)
  		 (error (quote ,error-type)
  						:message message
  						:code    code
  						,@args)))
  	
  (define-condition ssh-handshake-error (ssh-generic-error) ())
  
  (define-condition ssh-bad-hostkey (error)
  
negative.code: 			(usocket:socket-close (socket ssh))
  			(session-free (session ssh)))))
  
  (defmacro with-ssh-connection (session (&rest connection-args) &body body)
  	`(let ((,session (create-ssh-connection ,@connection-args)))
  		 (unwind-protect
  					(progn
  						,@body)
  			 (destroy-ssh-connection ,session))))
  
  (defmethod ssh-session-key ((ssh ssh-connection))
  	(session-hostkey (session ssh)))
  
  