xref: /freebsd/crypto/openssh/sshconnect.h (revision ca3176e7c8c53ffd5e822c8bad53fa885faf7ae0)
1ca3176e7SBrian Feldman /*	$OpenBSD: sshconnect.h,v 1.9 2001/04/12 19:15:25 markus Exp $	*/
2ca3176e7SBrian Feldman /*	$FreeBSD$	*/
3ca3176e7SBrian Feldman 
4b66f2d16SKris Kennaway /*
5b66f2d16SKris Kennaway  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
6b66f2d16SKris Kennaway  *
7b66f2d16SKris Kennaway  * Redistribution and use in source and binary forms, with or without
8b66f2d16SKris Kennaway  * modification, are permitted provided that the following conditions
9b66f2d16SKris Kennaway  * are met:
10b66f2d16SKris Kennaway  * 1. Redistributions of source code must retain the above copyright
11b66f2d16SKris Kennaway  *    notice, this list of conditions and the following disclaimer.
12b66f2d16SKris Kennaway  * 2. Redistributions in binary form must reproduce the above copyright
13b66f2d16SKris Kennaway  *    notice, this list of conditions and the following disclaimer in the
14b66f2d16SKris Kennaway  *    documentation and/or other materials provided with the distribution.
15b66f2d16SKris Kennaway  *
16b66f2d16SKris Kennaway  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17b66f2d16SKris Kennaway  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18b66f2d16SKris Kennaway  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19b66f2d16SKris Kennaway  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20b66f2d16SKris Kennaway  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21b66f2d16SKris Kennaway  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22b66f2d16SKris Kennaway  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23b66f2d16SKris Kennaway  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24b66f2d16SKris Kennaway  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25b66f2d16SKris Kennaway  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26b66f2d16SKris Kennaway  */
27a04a10f8SKris Kennaway #ifndef SSHCONNECT_H
28a04a10f8SKris Kennaway #define SSHCONNECT_H
29a04a10f8SKris Kennaway 
30ca3176e7SBrian Feldman int
31ca3176e7SBrian Feldman ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
32ca3176e7SBrian Feldman     u_short port, int connection_attempts,
33ca3176e7SBrian Feldman     int anonymous, struct passwd *pw,
34ca3176e7SBrian Feldman     const char *proxy_command);
35ca3176e7SBrian Feldman 
36ca3176e7SBrian Feldman void
37ca3176e7SBrian Feldman ssh_login(Key **keys, int nkeys, const char *orighost,
38ca3176e7SBrian Feldman     struct sockaddr *hostaddr, struct passwd *pw);
39ca3176e7SBrian Feldman 
40a04a10f8SKris Kennaway void
41a04a10f8SKris Kennaway check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
42a04a10f8SKris Kennaway     const char *user_hostfile, const char *system_hostfile);
43a04a10f8SKris Kennaway 
44a04a10f8SKris Kennaway void	ssh_kex(char *host, struct sockaddr *hostaddr);
45a04a10f8SKris Kennaway void	ssh_kex2(char *host, struct sockaddr *hostaddr);
46ca3176e7SBrian Feldman 
47ca3176e7SBrian Feldman void
48ca3176e7SBrian Feldman ssh_userauth1(const char *local_user, const char *server_user, char *host,
49ca3176e7SBrian Feldman     Key **keys, int nkeys);
50ca3176e7SBrian Feldman void
51ca3176e7SBrian Feldman ssh_userauth2(const char *local_user, const char *server_user, char *host,
52ca3176e7SBrian Feldman     Key **keys, int nkeys);
53a04a10f8SKris Kennaway 
54e0fbb1d2SBrian Feldman void	ssh_put_password(char *password);
55e0fbb1d2SBrian Feldman 
56a04a10f8SKris Kennaway #endif
57