Home
last modified time | relevance | path

Searched refs:ssh (Results 1 – 25 of 244) sorted by relevance

12345678910

/openbsd-src/usr.bin/ssh/
H A Dpacket.h13 * called by a name other than "ssh" or "Secure Shell".
48 struct ssh { argument
87 typedef int (ssh_packet_hook_fn)(struct ssh *, struct sshbuf *,
90 struct ssh *ssh_alloc_session_state(void);
91 struct ssh *ssh_packet_set_connection(struct ssh *, int, int);
92 void ssh_packet_set_timeout(struct ssh *, int, int);
93 int ssh_packet_stop_discard(struct ssh *);
94 int ssh_packet_connection_af(struct ssh *);
95 void ssh_packet_set_nonblocking(struct ssh *);
46 struct ssh { global() struct
51 kexssh global() argument
54 remote_ipaddrssh global() argument
55 remote_portssh global() argument
79 chanctxtssh global() argument
85 app_datassh global() argument
[all...]
H A Dserverloop.c12 * called by a name other than "ssh" or "Secure Shell".
89 static void server_init_dispatch(struct ssh *);
101 client_alive_check(struct ssh *ssh) in client_alive_check() argument
108 ssh_packet_inc_alive_timeouts(ssh) > in client_alive_check()
110 sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id)); in client_alive_check()
119 if ((channel_id = channel_find_open(ssh)) == -1) { in client_alive_check()
120 if ((r = sshpkt_start(ssh, SSH2_MSG_GLOBAL_REQUEST)) != 0 || in client_alive_check()
121 (r = sshpkt_put_cstring(ssh, "keepalive@openssh.com")) in client_alive_check()
123 (r = sshpkt_put_u8(ssh, in client_alive_check()
139 wait_until_can_do_something(struct ssh * ssh,int connection_in,int connection_out,struct pollfd ** pfdp,u_int * npfd_allocp,u_int * npfd_activep,sigset_t * sigsetp,int * conn_in_readyp,int * conn_out_readyp) wait_until_can_do_something() argument
253 process_input(struct ssh * ssh,int connection_in) process_input() argument
279 process_output(struct ssh * ssh,int connection_out) process_output() argument
291 process_buffered_input_packets(struct ssh * ssh) process_buffered_input_packets() argument
297 collect_children(struct ssh * ssh) collect_children() argument
313 server_loop2(struct ssh * ssh,Authctxt * authctxt) server_loop2() argument
374 server_input_keep_alive(int type,u_int32_t seq,struct ssh * ssh) server_input_keep_alive() argument
387 server_request_direct_tcpip(struct ssh * ssh,int * reason,const char ** errmsg) server_request_direct_tcpip() argument
435 server_request_direct_streamlocal(struct ssh * ssh) server_request_direct_streamlocal() argument
478 server_request_tun(struct ssh * ssh) server_request_tun() argument
542 server_request_session(struct ssh * ssh) server_request_session() argument
575 server_input_channel_open(int type,u_int32_t seq,struct ssh * ssh) server_input_channel_open() argument
634 server_input_hostkeys_prove(struct ssh * ssh,struct sshbuf ** respp) server_input_hostkeys_prove() argument
718 server_input_global_request(int type,u_int32_t seq,struct ssh * ssh) server_input_global_request() argument
823 server_input_channel_req(int type,u_int32_t seq,struct ssh * ssh) server_input_channel_req() argument
864 server_init_dispatch(struct ssh * ssh) server_init_dispatch() argument
[all...]
H A Dpacket.c13 * called by a name other than "ssh" or "Secure Shell".
75 #include "ssh.h"
209 struct ssh *
212 struct ssh *ssh = NULL; in ssh_alloc_session_state() local
215 if ((ssh = calloc(1, sizeof(*ssh))) == NULL || in ssh_alloc_session_state()
217 (ssh->kex = kex_new()) == NULL || in ssh_alloc_session_state()
224 TAILQ_INIT(&ssh->private_keys); in ssh_alloc_session_state()
225 TAILQ_INIT(&ssh in ssh_alloc_session_state()
255 ssh_packet_set_input_hook(struct ssh * ssh,ssh_packet_hook_fn * hook,void * ctx) ssh_packet_set_input_hook() argument
263 ssh_packet_is_rekeying(struct ssh * ssh) ssh_packet_is_rekeying() argument
273 ssh_packet_set_connection(struct ssh * ssh,int fd_in,int fd_out) ssh_packet_set_connection() argument
310 ssh_packet_set_timeout(struct ssh * ssh,int timeout,int count) ssh_packet_set_timeout() argument
325 ssh_packet_set_mux(struct ssh * ssh) ssh_packet_set_mux() argument
334 ssh_packet_get_mux(struct ssh * ssh) ssh_packet_get_mux() argument
340 ssh_packet_set_log_preamble(struct ssh * ssh,const char * fmt,...) ssh_packet_set_log_preamble() argument
359 ssh_packet_stop_discard(struct ssh * ssh) ssh_packet_stop_discard() argument
386 ssh_packet_start_discard(struct ssh * ssh,struct sshenc * enc,struct sshmac * mac,size_t mac_already,u_int discard) ssh_packet_start_discard() argument
414 ssh_packet_connection_is_on_socket(struct ssh * ssh) ssh_packet_connection_is_on_socket() argument
447 ssh_packet_get_bytes(struct ssh * ssh,u_int64_t * ibytes,u_int64_t * obytes) ssh_packet_get_bytes() argument
456 ssh_packet_connection_af(struct ssh * ssh) ssh_packet_connection_af() argument
464 ssh_packet_set_nonblocking(struct ssh * ssh) ssh_packet_set_nonblocking() argument
476 ssh_packet_get_connection_in(struct ssh * ssh) ssh_packet_get_connection_in() argument
484 ssh_packet_get_connection_out(struct ssh * ssh) ssh_packet_get_connection_out() argument
495 ssh_remote_ipaddr(struct ssh * ssh) ssh_remote_ipaddr() argument
527 ssh_remote_hostname(struct ssh * ssh) ssh_remote_hostname() argument
608 ssh_remote_port(struct ssh * ssh) ssh_remote_port() argument
620 ssh_local_ipaddr(struct ssh * ssh) ssh_local_ipaddr() argument
629 ssh_local_port(struct ssh * ssh) ssh_local_port() argument
637 ssh_packet_rdomain_in(struct ssh * ssh) ssh_packet_rdomain_in() argument
650 ssh_packet_close_internal(struct ssh * ssh,int do_close) ssh_packet_close_internal() argument
719 ssh_packet_close(struct ssh * ssh) ssh_packet_close() argument
725 ssh_packet_clear_keys(struct ssh * ssh) ssh_packet_clear_keys() argument
733 ssh_packet_set_protocol_flags(struct ssh * ssh,u_int protocol_flags) ssh_packet_set_protocol_flags() argument
741 ssh_packet_get_protocol_flags(struct ssh * ssh) ssh_packet_get_protocol_flags() argument
752 ssh_packet_init_compression(struct ssh * ssh) ssh_packet_init_compression() argument
762 start_compression_out(struct ssh * ssh,int level) start_compression_out() argument
782 start_compression_in(struct ssh * ssh) start_compression_in() argument
800 compress_buffer(struct ssh * ssh,struct sshbuf * in,struct sshbuf * out) compress_buffer() argument
846 uncompress_buffer(struct ssh * ssh,struct sshbuf * in,struct sshbuf * out) uncompress_buffer() argument
895 start_compression_out(struct ssh * ssh,int level) start_compression_out() argument
901 start_compression_in(struct ssh * ssh) start_compression_in() argument
907 compress_buffer(struct ssh * ssh,struct sshbuf * in,struct sshbuf * out) compress_buffer() argument
913 uncompress_buffer(struct ssh * ssh,struct sshbuf * in,struct sshbuf * out) uncompress_buffer() argument
920 ssh_clear_newkeys(struct ssh * ssh,int mode) ssh_clear_newkeys() argument
929 ssh_set_newkeys(struct ssh * ssh,int mode) ssh_set_newkeys() argument
1027 ssh_packet_need_rekeying(struct ssh * ssh,u_int outbound_packet_len) ssh_packet_need_rekeying() argument
1074 ssh_packet_check_rekey(struct ssh * ssh) ssh_packet_check_rekey() argument
1088 ssh_packet_enable_delayed_compress(struct ssh * ssh) ssh_packet_enable_delayed_compress() argument
1140 ssh_packet_send2_wrapped(struct ssh * ssh) ssh_packet_send2_wrapped() argument
1320 ssh_packet_send2(struct ssh * ssh) ssh_packet_send2() argument
1404 ssh_packet_read_seqnr(struct ssh * ssh,u_char * typep,u_int32_t * seqnr_p) ssh_packet_read_seqnr() argument
1485 ssh_packet_read(struct ssh * ssh) ssh_packet_read() argument
1496 ssh_packet_read_poll2_mux(struct ssh * ssh,u_char * typep,u_int32_t * seqnr_p) ssh_packet_read_poll2_mux() argument
1534 ssh_packet_read_poll2(struct ssh * ssh,u_char * typep,u_int32_t * seqnr_p) ssh_packet_read_poll2() argument
1772 ssh_packet_read_poll_seqnr(struct ssh * ssh,u_char * typep,u_int32_t * seqnr_p) ssh_packet_read_poll_seqnr() argument
1865 ssh_packet_process_incoming(struct ssh * ssh,const char * buf,u_int len) ssh_packet_process_incoming() argument
1887 ssh_packet_process_read(struct ssh * ssh,int fd) ssh_packet_process_read() argument
1911 ssh_packet_remaining(struct ssh * ssh) ssh_packet_remaining() argument
1925 ssh_packet_send_debug(struct ssh * ssh,const char * fmt,...) ssh_packet_send_debug() argument
1950 sshpkt_fmt_connection_id(struct ssh * ssh,char * s,size_t l) sshpkt_fmt_connection_id() argument
1962 sshpkt_vfatal(struct ssh * ssh,int r,const char * fmt,va_list ap) sshpkt_vfatal() argument
2013 sshpkt_fatal(struct ssh * ssh,int r,const char * fmt,...) sshpkt_fatal() argument
2031 ssh_packet_disconnect(struct ssh * ssh,const char * fmt,...) ssh_packet_disconnect() argument
2074 ssh_packet_write_poll(struct ssh * ssh) ssh_packet_write_poll() argument
2101 ssh_packet_write_wait(struct ssh * ssh) ssh_packet_write_wait() argument
2147 ssh_packet_have_data_to_write(struct ssh * ssh) ssh_packet_have_data_to_write() argument
2155 ssh_packet_not_very_much_data_to_write(struct ssh * ssh) ssh_packet_not_very_much_data_to_write() argument
2169 ssh_packet_interactive_data_to_write(struct ssh * ssh) ssh_packet_interactive_data_to_write() argument
2176 ssh_packet_set_tos(struct ssh * ssh,int tos) ssh_packet_set_tos() argument
2186 ssh_packet_set_interactive(struct ssh * ssh,int interactive,int qos_interactive,int qos_bulk) ssh_packet_set_interactive() argument
2207 ssh_packet_is_interactive(struct ssh * ssh) ssh_packet_is_interactive() argument
2213 ssh_packet_set_maxsize(struct ssh * ssh,u_int s) ssh_packet_set_maxsize() argument
2233 ssh_packet_inc_alive_timeouts(struct ssh * ssh) ssh_packet_inc_alive_timeouts() argument
2239 ssh_packet_set_alive_timeouts(struct ssh * ssh,int ka) ssh_packet_set_alive_timeouts() argument
2245 ssh_packet_get_maxsize(struct ssh * ssh) ssh_packet_get_maxsize() argument
2251 ssh_packet_set_rekey_limits(struct ssh * ssh,u_int64_t bytes,u_int32_t seconds) ssh_packet_set_rekey_limits() argument
2260 ssh_packet_get_rekey_timeout(struct ssh * ssh) ssh_packet_get_rekey_timeout() argument
2270 ssh_packet_set_server(struct ssh * ssh) ssh_packet_set_server() argument
2277 ssh_packet_set_authenticated(struct ssh * ssh) ssh_packet_set_authenticated() argument
2283 ssh_packet_get_input(struct ssh * ssh) ssh_packet_get_input() argument
2289 ssh_packet_get_output(struct ssh * ssh) ssh_packet_get_output() argument
2296 ssh_packet_set_postauth(struct ssh * ssh) ssh_packet_set_postauth() argument
2335 newkeys_to_blob(struct sshbuf * m,struct ssh * ssh,int mode) newkeys_to_blob() argument
2379 ssh_packet_get_state(struct ssh * ssh,struct sshbuf * m) ssh_packet_get_state() argument
2406 newkeys_from_blob(struct sshbuf * m,struct ssh * ssh,int mode) newkeys_from_blob() argument
2513 ssh_packet_set_state(struct ssh * ssh,struct sshbuf * m) ssh_packet_set_state() argument
2566 sshpkt_put(struct ssh * ssh,const void * v,size_t len) sshpkt_put() argument
2572 sshpkt_putb(struct ssh * ssh,const struct sshbuf * b) sshpkt_putb() argument
2578 sshpkt_put_u8(struct ssh * ssh,u_char val) sshpkt_put_u8() argument
2584 sshpkt_put_u32(struct ssh * ssh,u_int32_t val) sshpkt_put_u32() argument
2590 sshpkt_put_u64(struct ssh * ssh,u_int64_t val) sshpkt_put_u64() argument
2596 sshpkt_put_string(struct ssh * ssh,const void * v,size_t len) sshpkt_put_string() argument
2602 sshpkt_put_cstring(struct ssh * ssh,const void * v) sshpkt_put_cstring() argument
2608 sshpkt_put_stringb(struct ssh * ssh,const struct sshbuf * v) sshpkt_put_stringb() argument
2615 sshpkt_put_ec(struct ssh * ssh,const EC_POINT * v,const EC_GROUP * g) sshpkt_put_ec() argument
2622 sshpkt_put_bignum2(struct ssh * ssh,const BIGNUM * v) sshpkt_put_bignum2() argument
2631 sshpkt_get(struct ssh * ssh,void * valp,size_t len) sshpkt_get() argument
2637 sshpkt_get_u8(struct ssh * ssh,u_char * valp) sshpkt_get_u8() argument
2643 sshpkt_get_u32(struct ssh * ssh,u_int32_t * valp) sshpkt_get_u32() argument
2649 sshpkt_get_u64(struct ssh * ssh,u_int64_t * valp) sshpkt_get_u64() argument
2655 sshpkt_get_string(struct ssh * ssh,u_char ** valp,size_t * lenp) sshpkt_get_string() argument
2661 sshpkt_get_string_direct(struct ssh * ssh,const u_char ** valp,size_t * lenp) sshpkt_get_string_direct() argument
2667 sshpkt_peek_string_direct(struct ssh * ssh,const u_char ** valp,size_t * lenp) sshpkt_peek_string_direct() argument
2673 sshpkt_get_cstring(struct ssh * ssh,char ** valp,size_t * lenp) sshpkt_get_cstring() argument
2679 sshpkt_getb_froms(struct ssh * ssh,struct sshbuf ** valp) sshpkt_getb_froms() argument
2686 sshpkt_get_ec(struct ssh * ssh,EC_POINT * v,const EC_GROUP * g) sshpkt_get_ec() argument
2692 sshpkt_get_bignum2(struct ssh * ssh,BIGNUM ** valp) sshpkt_get_bignum2() argument
2699 sshpkt_get_end(struct ssh * ssh) sshpkt_get_end() argument
2707 sshpkt_ptr(struct ssh * ssh,size_t * lenp) sshpkt_ptr() argument
2717 sshpkt_start(struct ssh * ssh,u_char type) sshpkt_start() argument
2729 ssh_packet_send_mux(struct ssh * ssh) ssh_packet_send_mux() argument
2770 sshpkt_msg_ignore(struct ssh * ssh,u_int nbytes) sshpkt_msg_ignore() argument
2792 sshpkt_send(struct ssh * ssh) sshpkt_send() argument
2800 sshpkt_disconnect(struct ssh * ssh,const char * fmt,...) sshpkt_disconnect() argument
2822 sshpkt_add_padding(struct ssh * ssh,u_char pad) sshpkt_add_padding() argument
[all...]
H A Dssh_api.c38 int _ssh_exchange_banner(struct ssh *);
39 int _ssh_send_banner(struct ssh *, struct sshbuf *);
40 int _ssh_read_banner(struct ssh *, struct sshbuf *);
41 int _ssh_order_hostkeyalgs(struct ssh *);
42 int _ssh_verify_host_key(struct sshkey *, struct ssh *);
43 struct sshkey *_ssh_host_public_key(int, int, struct ssh *);
44 struct sshkey *_ssh_host_private_key(int, int, struct ssh *);
45 int _ssh_host_key_sign(struct ssh *, struct sshkey *, struct sshkey *,
83 ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params) in ssh_init()
87 struct ssh *ss in ssh_init() local
156 ssh_free(struct ssh * ssh) ssh_free() argument
182 ssh_set_app_data(struct ssh * ssh,void * app_data) ssh_set_app_data() argument
188 ssh_get_app_data(struct ssh * ssh) ssh_get_app_data() argument
195 ssh_add_hostkey(struct ssh * ssh,struct sshkey * key) ssh_add_hostkey() argument
229 ssh_set_verify_host_key_callback(struct ssh * ssh,int (* cb)(struct sshkey *,struct ssh *)) ssh_set_verify_host_key_callback() argument
241 ssh_input_append(struct ssh * ssh,const u_char * data,size_t len) ssh_input_append() argument
247 ssh_packet_next(struct ssh * ssh,u_char * typep) ssh_packet_next() argument
288 ssh_packet_payload(struct ssh * ssh,size_t * lenp) ssh_packet_payload() argument
294 ssh_packet_put(struct ssh * ssh,int type,const u_char * data,size_t len) ssh_packet_put() argument
306 ssh_output_ptr(struct ssh * ssh,size_t * len) ssh_output_ptr() argument
315 ssh_output_consume(struct ssh * ssh,size_t len) ssh_output_consume() argument
321 ssh_output_space(struct ssh * ssh,size_t len) ssh_output_space() argument
327 ssh_input_space(struct ssh * ssh,size_t len) ssh_input_space() argument
334 _ssh_read_banner(struct ssh * ssh,struct sshbuf * banner) _ssh_read_banner() argument
417 _ssh_send_banner(struct ssh * ssh,struct sshbuf * banner) _ssh_send_banner() argument
437 _ssh_exchange_banner(struct ssh * ssh) _ssh_exchange_banner() argument
476 _ssh_host_public_key(int type,int nid,struct ssh * ssh) _ssh_host_public_key() argument
491 _ssh_host_private_key(int type,int nid,struct ssh * ssh) _ssh_host_private_key() argument
506 _ssh_verify_host_key(struct sshkey * hostkey,struct ssh * ssh) _ssh_verify_host_key() argument
521 _ssh_order_hostkeyalgs(struct ssh * ssh) _ssh_order_hostkeyalgs() argument
573 _ssh_host_key_sign(struct ssh * ssh,struct sshkey * privkey,struct sshkey * pubkey,u_char ** signature,size_t * slen,const u_char * data,size_t dlen,const char * alg) _ssh_host_key_sign() argument
[all...]
H A Dchannels.h12 * called by a name other than "ssh" or "Secure Shell".
85 struct ssh;
89 typedef void channel_open_fn(struct ssh *, int, int, void *);
90 typedef void channel_callback_fn(struct ssh *, int, int, void *);
91 typedef int channel_infilter_fn(struct ssh *, struct Channel *, char *, int);
92 typedef void channel_filter_cleanup_fn(struct ssh *, int, void *);
93 typedef u_char *channel_outfilter_fn(struct ssh *, struct Channel *,
97 typedef void channel_confirm_cb(struct ssh *, int, struct Channel *, void *);
98 typedef void channel_confirm_abandon_cb(struct ssh *, struct Channel *, void *);
115 typedef int mux_callback_fn(struct ssh *, struc
[all...]
H A Dauth2-gss.c51 static int input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh);
52 static int input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh);
53 static int input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh);
54 static int input_gssapi_errtok(int, u_int32_t, struct ssh *);
61 userauth_gssapi(struct ssh *ssh, const char *method) in userauth_gssapi() argument
63 Authctxt *authctxt = ssh->authctxt; in userauth_gssapi()
72 if ((r = sshpkt_get_u32(ssh, &mechs)) != 0) in userauth_gssapi()
90 if ((r = sshpkt_get_string(ssh, &doid, &len)) != 0) in userauth_gssapi()
126 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_GSSAPI_RESPONSE)) != 0 || in userauth_gssapi()
127 (r = sshpkt_put_string(ssh, doid, len)) != 0 || in userauth_gssapi()
[all …]
H A Ddispatch.c38 dispatch_protocol_error(int type, u_int32_t seq, struct ssh *ssh) in dispatch_protocol_error() argument
43 if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 || in dispatch_protocol_error()
44 (r = sshpkt_put_u32(ssh, seq)) != 0 || in dispatch_protocol_error()
45 (r = sshpkt_send(ssh)) != 0 || in dispatch_protocol_error()
46 (r = ssh_packet_write_wait(ssh)) != 0) in dispatch_protocol_error()
47 sshpkt_fatal(ssh, r, "%s", __func__); in dispatch_protocol_error()
52 dispatch_protocol_ignore(int type, u_int32_t seq, struct ssh *ssh) in dispatch_protocol_ignore() argument
59 ssh_dispatch_init(struct ssh *ssh, dispatch_fn *dflt) in ssh_dispatch_init() argument
63 ssh->dispatch[i] = dflt; in ssh_dispatch_init()
67 ssh_dispatch_range(struct ssh *ssh, u_int from, u_int to, dispatch_fn *fn) in ssh_dispatch_range() argument
[all …]
H A Dssh_api.h42 int ssh_init(struct ssh **, int is_server, struct kex_params *kex_params);
47 void ssh_free(struct ssh *);
52 void ssh_set_app_data(struct ssh *, void *);
53 void *ssh_get_app_data(struct ssh *);
63 int ssh_add_hostkey(struct ssh *ssh, struct sshkey *key);
71 int ssh_set_verify_host_key_callback(struct ssh *ssh,
72 int (*cb)(struct sshkey *, struct ssh *));
88 int ssh_packet_next(struct ssh *ssh, u_char *typep);
95 const u_char *ssh_packet_payload(struct ssh *ssh, size_t *lenp);
102 int ssh_packet_put(struct ssh *ssh, int type, const u_char *data,
[all …]
H A Dchannels.c14 * called by a name other than "ssh" or "Secure Shell".
67 #include "ssh.h"
95 typedef void chan_fn(struct ssh *, Channel *c);
210 static void port_open_helper(struct ssh *ssh, Channel *c, char *rtype);
216 static Channel *rdynamic_connect_prepare(struct ssh *, char *, char *);
217 static int rdynamic_connect_finish(struct ssh *, Channel *);
225 channel_init_channels(struct ssh *ssh) in channel_init_channels()
236 ssh in channel_init_channels()
223 channel_init_channels(struct ssh * ssh) channel_init_channels() argument
238 channel_by_id(struct ssh * ssh,int id) channel_by_id() argument
255 channel_by_remote_id(struct ssh * ssh,u_int remote_id) channel_by_remote_id() argument
273 channel_lookup(struct ssh * ssh,int id) channel_lookup() argument
302 channel_add_timeout(struct ssh * ssh,const char * type_pattern,int timeout_secs) channel_add_timeout() argument
323 channel_clear_timeouts(struct ssh * ssh) channel_clear_timeouts() argument
337 lookup_timeout(struct ssh * ssh,const char * type) lookup_timeout() argument
357 channel_set_xtype(struct ssh * ssh,int id,const char * xctype) channel_set_xtype() argument
377 channel_set_used_time(struct ssh * ssh,Channel * c) channel_set_used_time() argument
389 channel_get_expiry(struct ssh * ssh,Channel * c) channel_get_expiry() argument
409 channel_register_fds(struct ssh * ssh,Channel * c,int rfd,int wfd,int efd,int extusage,int nonblock,int is_tty) channel_register_fds() argument
473 channel_new(struct ssh * ssh,char * ctype,int type,int rfd,int wfd,int efd,u_int window,u_int maxpack,int extusage,const char * remote_name,int nonblock) channel_new() argument
532 channel_close_fd(struct ssh * ssh,Channel * c,int * fdp) channel_close_fd() argument
582 channel_close_fds(struct ssh * ssh,Channel * c) channel_close_fds() argument
624 permission_set_get(struct ssh * ssh,int where) permission_set_get() argument
642 permission_set_get_array(struct ssh * ssh,int who,int where,struct permission *** permpp,u_int ** npermpp) permission_set_get_array() argument
663 permission_set_add(struct ssh * ssh,int who,int where,const char * host_to_connect,int port_to_connect,const char * listen_host,const char * listen_path,int listen_port,Channel * downstream) permission_set_add() argument
690 mux_remove_remote_forwardings(struct ssh * ssh,Channel * c) mux_remove_remote_forwardings() argument
722 channel_free(struct ssh * ssh,Channel * c) channel_free() argument
788 channel_free_all(struct ssh * ssh) channel_free_all() argument
821 channel_close_all(struct ssh * ssh) channel_close_all() argument
834 channel_stop_listening(struct ssh * ssh) channel_stop_listening() argument
862 channel_not_very_much_buffered_data(struct ssh * ssh) channel_not_very_much_buffered_data() argument
883 channel_still_open(struct ssh * ssh) channel_still_open() argument
926 channel_tty_open(struct ssh * ssh) channel_tty_open() argument
943 channel_find_open(struct ssh * ssh) channel_find_open() argument
1025 channel_open_message(struct ssh * ssh) channel_open_message() argument
1084 open_preamble(struct ssh * ssh,const char * where,Channel * c,const char * type) open_preamble() argument
1098 channel_send_open(struct ssh * ssh,int id) channel_send_open() argument
1114 channel_request_start(struct ssh * ssh,int id,char * service,int wantconfirm) channel_request_start() argument
1136 channel_register_status_confirm(struct ssh * ssh,int id,channel_confirm_cb * cb,channel_confirm_abandon_cb * abandon_cb,void * ctx) channel_register_status_confirm() argument
1153 channel_register_open_confirm(struct ssh * ssh,int id,channel_open_fn * fn,void * ctx) channel_register_open_confirm() argument
1167 channel_register_cleanup(struct ssh * ssh,int id,channel_callback_fn * fn,int do_close) channel_register_cleanup() argument
1181 channel_cancel_cleanup(struct ssh * ssh,int id) channel_cancel_cleanup() argument
1194 channel_register_filter(struct ssh * ssh,int id,channel_infilter_fn * ifn,channel_outfilter_fn * ofn,channel_filter_cleanup_fn * cfn,void * ctx) channel_register_filter() argument
1210 channel_set_fds(struct ssh * ssh,int id,int rfd,int wfd,int efd,int extusage,int nonblock,int is_tty,u_int window_max) channel_set_fds() argument
1234 channel_pre_listener(struct ssh * ssh,Channel * c) channel_pre_listener() argument
1240 channel_pre_connecting(struct ssh * ssh,Channel * c) channel_pre_connecting() argument
1247 channel_pre_open(struct ssh * ssh,Channel * c) channel_pre_open() argument
1293 x11_open_helper(struct ssh * ssh,struct sshbuf * b) x11_open_helper() argument
1360 channel_force_close(struct ssh * ssh,Channel * c,int abandon) channel_force_close() argument
1386 channel_pre_x11_open(struct ssh * ssh,Channel * c) channel_pre_x11_open() argument
1406 channel_pre_mux_client(struct ssh * ssh,Channel * c) channel_pre_mux_client() argument
1676 channel_connect_stdio_fwd(struct ssh * ssh,const char * host_to_connect,int port_to_connect,int in,int out,int nonblock) channel_connect_stdio_fwd() argument
1702 channel_pre_dynamic(struct ssh * ssh,Channel * c) channel_pre_dynamic() argument
1749 rdynamic_close(struct ssh * ssh,Channel * c) rdynamic_close() argument
1757 channel_before_prepare_io_rdynamic(struct ssh * ssh,Channel * c) channel_before_prepare_io_rdynamic() argument
1815 channel_post_x11_listener(struct ssh * ssh,Channel * c) channel_post_x11_listener() argument
1864 port_open_helper(struct ssh * ssh,Channel * c,char * rtype) port_open_helper() argument
1923 channel_set_x11_refuse_time(struct ssh * ssh,time_t refuse_time) channel_set_x11_refuse_time() argument
1932 channel_post_port_listener(struct ssh * ssh,Channel * c) channel_post_port_listener() argument
1991 channel_post_auth_listener(struct ssh * ssh,Channel * c) channel_post_auth_listener() argument
2019 channel_post_connecting(struct ssh * ssh,Channel * c) channel_post_connecting() argument
2091 channel_handle_rfd(struct ssh * ssh,Channel * c) channel_handle_rfd() argument
2160 channel_handle_wfd(struct ssh * ssh,Channel * c) channel_handle_wfd() argument
2241 channel_handle_efd_write(struct ssh * ssh,Channel * c) channel_handle_efd_write() argument
2269 channel_handle_efd_read(struct ssh * ssh,Channel * c) channel_handle_efd_read() argument
2296 channel_handle_efd(struct ssh * ssh,Channel * c) channel_handle_efd() argument
2313 channel_check_window(struct ssh * ssh,Channel * c) channel_check_window() argument
2341 channel_post_open(struct ssh * ssh,Channel * c) channel_post_open() argument
2350 read_mux(struct ssh * ssh,Channel * c,u_int need) read_mux() argument
2374 channel_post_mux_client_read(struct ssh * ssh,Channel * c) channel_post_mux_client_read() argument
2410 channel_post_mux_client_write(struct ssh * ssh,Channel * c) channel_post_mux_client_write() argument
2432 channel_post_mux_client(struct ssh * ssh,Channel * c) channel_post_mux_client() argument
2439 channel_post_mux_listener(struct ssh * ssh,Channel * c) channel_post_mux_listener() argument
2530 channel_garbage_collect(struct ssh * ssh,Channel * c) channel_garbage_collect() argument
2554 channel_handler(struct ssh * ssh,int table,struct timespec * timeout) channel_handler() argument
2615 channel_before_prepare_io(struct ssh * ssh) channel_before_prepare_io() argument
2750 channel_prepare_poll(struct ssh * ssh,struct pollfd ** pfdp,u_int * npfd_allocp,u_int * npfd_activep,u_int npfd_reserved,struct timespec * timeout) channel_prepare_poll() argument
2819 channel_after_poll(struct ssh * ssh,struct pollfd * pfd,u_int npfd) channel_after_poll() argument
2904 channel_output_poll_input_open(struct ssh * ssh,Channel * c) channel_output_poll_input_open() argument
2978 channel_output_poll_extended_read(struct ssh * ssh,Channel * c) channel_output_poll_extended_read() argument
3014 channel_output_poll(struct ssh * ssh) channel_output_poll() argument
3092 channel_proxy_downstream(struct ssh * ssh,Channel * downstream) channel_proxy_downstream() argument
3245 channel_proxy_upstream(Channel * c,int type,u_int32_t seq,struct ssh * ssh) channel_proxy_upstream() argument
3326 channel_parse_id(struct ssh * ssh,const char * where,const char * what) channel_parse_id() argument
3344 channel_from_packet_id(struct ssh * ssh,const char * where,const char * what) channel_from_packet_id() argument
3357 channel_input_data(int type,u_int32_t seq,struct ssh * ssh) channel_input_data() argument
3425 channel_input_extended_data(int type,u_int32_t seq,struct ssh * ssh) channel_input_extended_data() argument
3478 channel_input_ieof(int type,u_int32_t seq,struct ssh * ssh) channel_input_ieof() argument
3503 channel_input_oclose(int type,u_int32_t seq,struct ssh * ssh) channel_input_oclose() argument
3519 channel_input_open_confirmation(int type,u_int32_t seq,struct ssh * ssh) channel_input_open_confirmation() argument
3574 channel_input_open_failure(int type,u_int32_t seq,struct ssh * ssh) channel_input_open_failure() argument
3611 channel_input_window_adjust(int type,u_int32_t seq,struct ssh * ssh) channel_input_window_adjust() argument
3641 channel_input_status_confirm(int type,u_int32_t seq,struct ssh * ssh) channel_input_status_confirm() argument
3671 channel_set_af(struct ssh * ssh,int af) channel_set_af() argument
3693 channel_fwd_bind_addr(struct ssh * ssh,const char * listen_addr,int * wildcardp,int is_client,struct ForwardOptions * fwd_opts) channel_fwd_bind_addr() argument
3747 channel_setup_fwd_listener_tcpip(struct ssh * ssh,int type,struct Forward * fwd,int * allocated_listen_port,struct ForwardOptions * fwd_opts) channel_setup_fwd_listener_tcpip() argument
3898 channel_setup_fwd_listener_streamlocal(struct ssh * ssh,int type,struct Forward * fwd,struct ForwardOptions * fwd_opts) channel_setup_fwd_listener_streamlocal() argument
3972 channel_cancel_rport_listener_tcpip(struct ssh * ssh,const char * host,u_short port) channel_cancel_rport_listener_tcpip() argument
3993 channel_cancel_rport_listener_streamlocal(struct ssh * ssh,const char * path) channel_cancel_rport_listener_streamlocal() argument
4015 channel_cancel_rport_listener(struct ssh * ssh,struct Forward * fwd) channel_cancel_rport_listener() argument
4027 channel_cancel_lport_listener_tcpip(struct ssh * ssh,const char * lhost,u_short lport,int cport,struct ForwardOptions * fwd_opts) channel_cancel_lport_listener_tcpip() argument
4063 channel_cancel_lport_listener_streamlocal(struct ssh * ssh,const char * path) channel_cancel_lport_listener_streamlocal() argument
4090 channel_cancel_lport_listener(struct ssh * ssh,struct Forward * fwd,int cport,struct ForwardOptions * fwd_opts) channel_cancel_lport_listener() argument
4104 channel_setup_local_fwd_listener(struct ssh * ssh,struct Forward * fwd,struct ForwardOptions * fwd_opts) channel_setup_local_fwd_listener() argument
4145 check_rfwd_permission(struct ssh * ssh,struct Forward * fwd) check_rfwd_permission() argument
4181 channel_setup_remote_fwd_listener(struct ssh * ssh,struct Forward * fwd,int * allocated_listen_port,struct ForwardOptions * fwd_opts) channel_setup_remote_fwd_listener() argument
4237 channel_request_remote_forwarding(struct ssh * ssh,struct Forward * fwd) channel_request_remote_forwarding() argument
4353 channel_request_rforward_cancel_tcpip(struct ssh * ssh,const char * host,u_short port) channel_request_rforward_cancel_tcpip() argument
4390 channel_request_rforward_cancel_streamlocal(struct ssh * ssh,const char * path) channel_request_rforward_cancel_streamlocal() argument
4425 channel_request_rforward_cancel(struct ssh * ssh,struct Forward * fwd) channel_request_rforward_cancel() argument
4443 channel_permit_all(struct ssh * ssh,int where) channel_permit_all() argument
4455 channel_add_permission(struct ssh * ssh,int who,int where,char * host,int port) channel_add_permission() argument
4477 channel_disable_admin(struct ssh * ssh,int where) channel_disable_admin() argument
4488 channel_clear_permission(struct ssh * ssh,int who,int where) channel_clear_permission() argument
4504 channel_update_permission(struct ssh * ssh,int idx,int newport) channel_update_permission() argument
4604 connect_to_helper(struct ssh * ssh,const char * name,int port,int socktype,char * ctype,char * rname,struct channel_connect * cctx,int * reason,const char ** errmsg) connect_to_helper() argument
4670 connect_to(struct ssh * ssh,const char * host,int port,char * ctype,char * rname) connect_to() argument
4698 channel_connect_by_listen_address(struct ssh * ssh,const char * listen_host,u_short listen_port,char * ctype,char * rname) channel_connect_by_listen_address() argument
4726 channel_connect_by_listen_path(struct ssh * ssh,const char * path,char * ctype,char * rname) channel_connect_by_listen_path() argument
4749 channel_connect_to_port(struct ssh * ssh,const char * host,u_short port,char * ctype,char * rname,int * reason,const char ** errmsg) channel_connect_to_port() argument
4810 channel_connect_to_path(struct ssh * ssh,const char * path,char * ctype,char * rname) channel_connect_to_path() argument
4849 channel_send_window_changes(struct ssh * ssh) channel_send_window_changes() argument
4874 rdynamic_connect_prepare(struct ssh * ssh,char * ctype,char * rname) rdynamic_connect_prepare() argument
4899 rdynamic_connect_finish(struct ssh * ssh,Channel * c) rdynamic_connect_finish() argument
4945 x11_create_display_inet(struct ssh * ssh,int x11_display_offset,int x11_use_localhost,int single_connection,u_int * display_numberp,int ** chanids) x11_create_display_inet() argument
5054 x11_connect_display(struct ssh * ssh) x11_connect_display() argument
5159 x11_request_forwarding_with_spoofing(struct ssh * ssh,int client_session_id,const char * disp,const char * proto,const char * data,int want_reply) x11_request_forwarding_with_spoofing() argument
[all...]
H A Dnchan.c63 * See the debugging output from 'ssh -v' and 'sshd -d' of
64 * ssh-1.2.27 as an example.
75 static void chan_send_eof2(struct ssh *, Channel *);
76 static void chan_send_eow2(struct ssh *, Channel *);
79 static void chan_shutdown_write(struct ssh *, Channel *);
80 static void chan_shutdown_read(struct ssh *, Channel *);
81 static void chan_shutdown_extended_read(struct ssh *, Channel *);
111 chan_read_failed(struct ssh *ssh, Channel *c) in chan_read_failed() argument
116 chan_shutdown_read(ssh, in chan_read_failed()
127 chan_ibuf_empty(struct ssh * ssh,Channel * c) chan_ibuf_empty() argument
149 chan_obuf_empty(struct ssh * ssh,Channel * c) chan_obuf_empty() argument
170 chan_rcvd_eow(struct ssh * ssh,Channel * c) chan_rcvd_eow() argument
182 chan_send_eof2(struct ssh * ssh,Channel * c) chan_send_eof2() argument
205 chan_send_close2(struct ssh * ssh,Channel * c) chan_send_close2() argument
228 chan_send_eow2(struct ssh * ssh,Channel * c) chan_send_eow2() argument
253 chan_rcvd_ieof(struct ssh * ssh,Channel * c) chan_rcvd_ieof() argument
266 chan_rcvd_oclose(struct ssh * ssh,Channel * c) chan_rcvd_oclose() argument
306 chan_write_failed(struct ssh * ssh,Channel * c) chan_write_failed() argument
325 chan_mark_dead(struct ssh * ssh,Channel * c) chan_mark_dead() argument
331 chan_is_dead(struct ssh * ssh,Channel * c,int do_send) chan_is_dead() argument
373 chan_shutdown_write(struct ssh * ssh,Channel * c) chan_shutdown_write() argument
398 chan_shutdown_read(struct ssh * ssh,Channel * c) chan_shutdown_read() argument
421 chan_shutdown_extended_read(struct ssh * ssh,Channel * c) chan_shutdown_extended_read() argument
[all...]
H A Dsshconnect2.c46 #include "ssh.h"
70 #include "ssh-sk.h"
74 #include "ssh-gss.h"
89 verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh) in verify_host_key_callback() argument
213 ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port, in ssh_kex2() argument
225 ssh_packet_set_rekey_limits(ssh, options.rekey_limit, in ssh_kex2()
248 kex_proposal_populate_entries(ssh, myproposal, in ssh_kex2()
256 if ((r = kex_setup(ssh, myproposa in ssh_kex2()
415 ssh_userauth2(struct ssh * ssh,const char * local_user,const char * server_user,char * host,Sensitive * sensitive) ssh_userauth2() argument
483 input_userauth_service_accept(int type,u_int32_t seq,struct ssh * ssh) input_userauth_service_accept() argument
516 userauth(struct ssh * ssh,char * authlist) userauth() argument
554 input_userauth_error(int type,u_int32_t seq,struct ssh * ssh) input_userauth_error() argument
561 input_userauth_banner(int type,u_int32_t seq,struct ssh * ssh) input_userauth_banner() argument
580 input_userauth_success(int type,u_int32_t seq,struct ssh * ssh) input_userauth_success() argument
613 input_userauth_failure(int type,u_int32_t seq,struct ssh * ssh) input_userauth_failure() argument
673 input_userauth_pk_ok(int type,u_int32_t seq,struct ssh * ssh) input_userauth_pk_ok() argument
744 userauth_gssapi(struct ssh * ssh) userauth_gssapi() argument
800 userauth_gssapi_cleanup(struct ssh * ssh) userauth_gssapi_cleanup() argument
810 process_gssapi_token(struct ssh * ssh,gss_buffer_t recv_tok) process_gssapi_token() argument
877 input_gssapi_response(int type,u_int32_t plen,struct ssh * ssh) input_gssapi_response() argument
921 input_gssapi_token(int type,u_int32_t plen,struct ssh * ssh) input_gssapi_token() argument
953 input_gssapi_errtok(int type,u_int32_t plen,struct ssh * ssh) input_gssapi_errtok() argument
987 input_gssapi_error(int type,u_int32_t plen,struct ssh * ssh) input_gssapi_error() argument
1008 userauth_none(struct ssh * ssh) userauth_none() argument
1024 userauth_passwd(struct ssh * ssh) userauth_passwd() argument
1064 input_userauth_passwd_changereq(int type,u_int32_t seqnr,struct ssh * ssh) input_userauth_passwd_changereq() argument
1145 key_sig_algorithm(struct ssh * ssh,const struct sshkey * key) key_sig_algorithm() argument
1300 sign_and_send_pubkey(struct ssh * ssh,Identity * id) sign_and_send_pubkey() argument
1471 send_pubkey_test(struct ssh * ssh,Identity * id) send_pubkey_test() argument
1620 get_agent_identities(struct ssh * ssh,int * agent_fdp,struct ssh_identitylist ** idlistp) get_agent_identities() argument
1658 pubkey_prepare(struct ssh * ssh,Authctxt * authctxt) pubkey_prepare() argument
1819 pubkey_cleanup(struct ssh * ssh) pubkey_cleanup() argument
1847 userauth_pubkey(struct ssh * ssh) userauth_pubkey() argument
1899 userauth_kbdint(struct ssh * ssh) userauth_kbdint() argument
1932 input_userauth_info_req(int type,u_int32_t seq,struct ssh * ssh) input_userauth_info_req() argument
2003 ssh_keysign(struct ssh * ssh,struct sshkey * key,u_char ** sigp,size_t * lenp,const u_char * data,size_t datalen) ssh_keysign() argument
2119 userauth_hostbased(struct ssh * ssh) userauth_hostbased() argument
[all...]
H A Dkex.c40 #include "ssh.h"
63 static int kex_choose_conf(struct ssh *, uint32_t seq);
64 static int kex_input_newkeys(int, u_int32_t, struct ssh *);
86 kex_proposal_populate_entries(struct ssh *ssh, char *prop[PROPOSAL_MAX], in kex_proposal_populate_entries() argument
92 const char **defprop = ssh->kex->server ? defpropserver : defpropclient; in kex_proposal_populate_entries()
102 if ((cp = kex_names_cat(kexalgos, ssh->kex->server ? in kex_proposal_populate_entries()
110 prop[i] = compat_kex_proposal(ssh, cp); in kex_proposal_populate_entries()
231 kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh) in kex_protocol_error() argument
249 kex_reset_dispatch(struct ssh * ssh) kex_reset_dispatch() argument
256 kex_set_server_sig_algs(struct ssh * ssh,const char * allowed_algs) kex_set_server_sig_algs() argument
292 kex_compose_ext_info_server(struct ssh * ssh,struct sshbuf * m) kex_compose_ext_info_server() argument
314 kex_compose_ext_info_client(struct ssh * ssh,struct sshbuf * m) kex_compose_ext_info_client() argument
331 kex_maybe_send_ext_info(struct ssh * ssh) kex_maybe_send_ext_info() argument
368 kex_server_update_ext_info(struct ssh * ssh) kex_server_update_ext_info() argument
388 kex_send_newkeys(struct ssh * ssh) kex_send_newkeys() argument
422 kex_ext_info_client_parse(struct ssh * ssh,const char * name,const u_char * value,size_t vlen) kex_ext_info_client_parse() argument
456 kex_ext_info_server_parse(struct ssh * ssh,const char * name,const u_char * value,size_t vlen) kex_ext_info_server_parse() argument
472 kex_input_ext_info(int type,u_int32_t seq,struct ssh * ssh) kex_input_ext_info() argument
519 kex_input_newkeys(int type,u_int32_t seq,struct ssh * ssh) kex_input_newkeys() argument
567 kex_send_kexinit(struct ssh * ssh) kex_send_kexinit() argument
605 kex_input_kexinit(int type,u_int32_t seq,struct ssh * ssh) kex_input_kexinit() argument
742 kex_ready(struct ssh * ssh,char * proposal[PROPOSAL_MAX]) kex_ready() argument
755 kex_setup(struct ssh * ssh,char * proposal[PROPOSAL_MAX]) kex_setup() argument
774 kex_start_rekex(struct ssh * ssh) kex_start_rekex() argument
811 choose_mac(struct ssh * ssh,struct sshmac * mac,char * client,char * server) choose_mac() argument
921 kex_choose_conf(struct ssh * ssh,uint32_t seq) kex_choose_conf() argument
1054 derive_key(struct ssh * ssh,int id,u_int need,u_char * hash,u_int hashlen,const struct sshbuf * shared_secret,u_char ** keyp) derive_key() argument
1119 kex_derive_keys(struct ssh * ssh,u_char * hash,u_int hashlen,const struct sshbuf * shared_secret) kex_derive_keys() argument
1158 kex_load_hostkey(struct ssh * ssh,struct sshkey ** prvp,struct sshkey ** pubp) kex_load_hostkey() argument
1179 kex_verify_host_key(struct ssh * ssh,struct sshkey * server_host_key) kex_verify_host_key() argument
1210 send_error(struct ssh * ssh,char * msg) send_error() argument
1230 kex_exchange_identification(struct ssh * ssh,int timeout_ms,const char * version_addendum) kex_exchange_identification() argument
[all...]
H A Dclientloop.c12 * called by a name other than "ssh" or "Secure Shell".
85 #include "ssh.h"
159 static void client_init_dispatch(struct ssh *ssh);
176 /* XXX move to struct ssh? */
236 set_control_persist_exit_time(struct ssh *ssh) in set_control_persist_exit_time() argument
242 } else if (channel_still_open(ssh)) { in set_control_persist_exit_time()
280 client_x11_get_proto(struct ssh *ssh, cons argument
451 client_check_window_change(struct ssh * ssh) client_check_window_change() argument
461 client_global_request_reply(int type,u_int32_t seq,struct ssh * ssh) client_global_request_reply() argument
486 server_alive_check(struct ssh * ssh) server_alive_check() argument
506 send_chaff(struct ssh * ssh) send_chaff() argument
567 obfuscate_keystroke_timing(struct ssh * ssh,struct timespec * timeout,int channel_did_enqueue) obfuscate_keystroke_timing() argument
674 client_wait_until_can_do_something(struct ssh * ssh,struct pollfd ** pfdp,u_int * npfd_allocp,u_int * npfd_activep,int channel_did_enqueue,sigset_t * sigsetp,int * conn_in_readyp,int * conn_out_readyp) client_wait_until_can_do_something() argument
781 client_process_net_input(struct ssh * ssh) client_process_net_input() argument
805 client_status_confirm(struct ssh * ssh,int type,Channel * c,void * ctx) client_status_confirm() argument
869 client_abandon_status_confirm(struct ssh * ssh,Channel * c,void * ctx) client_abandon_status_confirm() argument
875 client_expect_confirm(struct ssh * ssh,int id,const char * request,enum confirm_action action) client_expect_confirm() argument
975 process_cmdline(struct ssh * ssh) process_cmdline() argument
1161 process_escapes(struct ssh * ssh,Channel * c,struct sshbuf * bin,struct sshbuf * bout,struct sshbuf * berr,char * buf,int len) process_escapes() argument
1383 client_process_buffered_input_packets(struct ssh * ssh) client_process_buffered_input_packets() argument
1404 client_filter_cleanup(struct ssh * ssh,int cid,void * ctx) client_filter_cleanup() argument
1410 client_simple_escape_filter(struct ssh * ssh,Channel * c,char * buf,int len) client_simple_escape_filter() argument
1420 client_channel_closed(struct ssh * ssh,int id,int force,void * arg) client_channel_closed() argument
1434 client_loop(struct ssh * ssh,int have_pty,int escape_char_arg,int ssh2_chan_id) client_loop() argument
1678 client_request_forwarded_tcpip(struct ssh * ssh,const char * request_type,int rchan,u_int rwindow,u_int rmaxpack) client_request_forwarded_tcpip() argument
1738 client_request_forwarded_streamlocal(struct ssh * ssh,const char * request_type,int rchan) client_request_forwarded_streamlocal() argument
1760 client_request_x11(struct ssh * ssh,const char * request_type,int rchan) client_request_x11() argument
1798 client_request_agent(struct ssh * ssh,const char * request_type,int rchan) client_request_agent() argument
1834 client_request_tun_fwd(struct ssh * ssh,int tun_mode,int local_tun,int remote_tun,channel_open_fn * cb,void * cbctx) client_request_tun_fwd() argument
1875 client_input_channel_open(int type,u_int32_t seq,struct ssh * ssh) client_input_channel_open() argument
1937 client_input_channel_req(int type,u_int32_t seq,struct ssh * ssh) client_input_channel_req() argument
2314 client_global_hostkeys_prove_confirm(struct ssh * ssh,int type,u_int32_t seq,void * _ctx) client_global_hostkeys_prove_confirm() argument
2418 client_input_hostkeys(struct ssh * ssh) client_input_hostkeys() argument
2624 client_input_global_request(int type,u_int32_t seq,struct ssh * ssh) client_input_global_request() argument
2651 client_send_env(struct ssh * ssh,int id,const char * name,const char * val) client_send_env() argument
2664 client_session2_setup(struct ssh * ssh,int id,int want_tty,int want_subsystem,const char * term,struct termios * tiop,int in_fd,struct sshbuf * cmd,char ** env) client_session2_setup() argument
2777 client_init_dispatch(struct ssh * ssh) client_init_dispatch() argument
[all...]
H A Dkexgexs.c51 static int input_kex_dh_gex_request(int, u_int32_t, struct ssh *);
52 static int input_kex_dh_gex_init(int, u_int32_t, struct ssh *);
55 kexgex_server(struct ssh *ssh) in kexgex_server() argument
57 ssh_dispatch_set(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST, in kexgex_server()
64 input_kex_dh_gex_request(int type, u_int32_t seq, struct ssh *ssh) in input_kex_dh_gex_request() argument
66 struct kex *kex = ssh->kex; in input_kex_dh_gex_request()
72 ssh_dispatch_set(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST, &kex_protocol_error); in input_kex_dh_gex_request()
74 if ((r = sshpkt_get_u32(ssh, &min)) != 0 || in input_kex_dh_gex_request()
75 (r = sshpkt_get_u32(ssh, &nbits)) != 0 || in input_kex_dh_gex_request()
76 (r = sshpkt_get_u32(ssh, &max)) != 0 || in input_kex_dh_gex_request()
[all …]
H A Dsession.c10 * called by a name other than "ssh" or "Secure Shell".
60 #include "ssh.h"
85 #include "ssh-gss.h"
104 void session_set_fds(struct ssh *, Session *, int, int, int, int, int);
107 int session_setup_x11fwd(struct ssh *, Session *);
108 int do_exec_pty(struct ssh *, Session *, const char *);
109 int do_exec_no_pty(struct ssh *, Session *, const char *);
110 int do_exec(struct ssh *, Session *, const char *);
111 void do_login(struct ssh *, Session *, const char *);
112 void do_child(struct ssh *, Sessio
171 auth_input_request_forwarding(struct ssh * ssh,struct passwd * pw) auth_input_request_forwarding() argument
281 set_fwdpermit_from_authopts(struct ssh * ssh,const struct sshauthopt * opts) set_fwdpermit_from_authopts() argument
320 do_authenticated(struct ssh * ssh,Authctxt * authctxt) do_authenticated() argument
375 do_exec_no_pty(struct ssh * ssh,Session * s,const char * command) do_exec_no_pty() argument
533 do_exec_pty(struct ssh * ssh,Session * s,const char * command) do_exec_pty() argument
627 do_exec(struct ssh * ssh,Session * s,const char * command) do_exec() argument
704 do_login(struct ssh * ssh,Session * s,const char * command) do_login() argument
824 do_setup_env(struct ssh * ssh,Session * s,const char * shell) do_setup_env() argument
953 do_rc_files(struct ssh * ssh,Session * s,const char * shell) do_rc_files() argument
1169 child_close_fds(struct ssh * ssh) child_close_fds() argument
1217 do_child(struct ssh * ssh,Session * s,const char * command) do_child() argument
1558 session_window_change_req(struct ssh * ssh,Session * s) session_window_change_req() argument
1573 session_pty_req(struct ssh * ssh,Session * s) session_pty_req() argument
1623 session_subsystem_req(struct ssh * ssh,Session * s) session_subsystem_req() argument
1667 session_x11_req(struct ssh * ssh,Session * s) session_x11_req() argument
1703 session_shell_req(struct ssh * ssh,Session * s) session_shell_req() argument
1716 session_exec_req(struct ssh * ssh,Session * s) session_exec_req() argument
1734 session_break_req(struct ssh * ssh,Session * s) session_break_req() argument
1748 session_env_req(struct ssh * ssh,Session * s) session_env_req() argument
1807 session_signal_req(struct ssh * ssh,Session * s) session_signal_req() argument
1853 session_auth_agent_req(struct ssh * ssh,Session * s) session_auth_agent_req() argument
1874 session_input_channel_req(struct ssh * ssh,Channel * c,const char * rtype) session_input_channel_req() argument
1918 session_set_fds(struct ssh * ssh,Session * s,int fdin,int fdout,int fderr,int ignore_fderr,int is_tty) session_set_fds() argument
1998 session_close_x11(struct ssh * ssh,int id) session_close_x11() argument
2014 session_close_single_x11(struct ssh * ssh,int id,int force,void * arg) session_close_single_x11() argument
2046 session_exit_message(struct ssh * ssh,Session * s,int status) session_exit_message() argument
2102 session_close(struct ssh * ssh,Session * s) session_close() argument
2133 session_close_by_pid(struct ssh * ssh,pid_t pid,int status) session_close_by_pid() argument
2152 session_close_by_channel(struct ssh * ssh,int id,int force,void * arg) session_close_by_channel() argument
2190 session_destroy_all(struct ssh * ssh,void (* closefunc)(Session *)) session_destroy_all() argument
2233 session_setup_x11fwd(struct ssh * ssh,Session * s) session_setup_x11fwd() argument
2294 do_authenticated2(struct ssh * ssh,Authctxt * authctxt) do_authenticated2() argument
2300 do_cleanup(struct ssh * ssh,Authctxt * authctxt) do_cleanup() argument
2351 session_get_remote_name_or_ip(struct ssh * ssh,u_int utmp_size,int use_dns) session_get_remote_name_or_ip() argument
[all...]
H A Dauth2-chall.c45 static int auth2_challenge_start(struct ssh *);
46 static int send_userauth_info_request(struct ssh *);
47 static int input_userauth_info_response(int, u_int32_t, struct ssh *);
154 auth2_challenge(struct ssh *ssh, char *devs) in auth2_challenge() argument
156 Authctxt *authctxt = ssh->authctxt; in auth2_challenge()
165 return auth2_challenge_start(ssh); in auth2_challenge()
170 auth2_challenge_stop(struct ssh *ssh) in auth2_challenge_stop() argument
172 Authctxt *authctxt = ssh->authctxt; in auth2_challenge_stop()
174 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); in auth2_challenge_stop()
183 auth2_challenge_start(struct ssh *ssh) in auth2_challenge_start() argument
[all …]
H A Dkexgexc.c49 static int input_kex_dh_gex_group(int, u_int32_t, struct ssh *);
50 static int input_kex_dh_gex_reply(int, u_int32_t, struct ssh *);
53 kexgex_client(struct ssh *ssh) in kexgex_client() argument
55 struct kex *kex = ssh->kex; in kexgex_client()
64 if (ssh->compat & SSH_BUG_DHGEX_LARGE) in kexgex_client()
67 if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST)) != 0 || in kexgex_client()
68 (r = sshpkt_put_u32(ssh, kex->min)) != 0 || in kexgex_client()
69 (r = sshpkt_put_u32(ssh, kex->nbits)) != 0 || in kexgex_client()
70 (r = sshpkt_put_u32(ssh, kex->max)) != 0 || in kexgex_client()
71 (r = sshpkt_send(ssh)) != 0) in kexgex_client()
[all …]
H A Dkexgen.c41 static int input_kex_gen_init(int, u_int32_t, struct ssh *);
42 static int input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh);
96 kex_gen_client(struct ssh *ssh) in kex_gen_client() argument
98 struct kex *kex = ssh->kex; in kex_gen_client()
129 if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_ECDH_INIT)) != 0 || in kex_gen_client()
130 (r = sshpkt_put_stringb(ssh, kex->client_pub)) != 0 || in kex_gen_client()
131 (r = sshpkt_send(ssh)) != 0) in kex_gen_client()
134 ssh_dispatch_set(ssh, SSH2_MSG_KEX_ECDH_REPL in kex_gen_client()
136 input_kex_gen_reply(int type,u_int32_t seq,struct ssh * ssh) input_kex_gen_reply() argument
255 kex_gen_server(struct ssh * ssh) kex_gen_server() argument
263 input_kex_gen_init(int type,u_int32_t seq,struct ssh * ssh) input_kex_gen_init() argument
[all...]
H A Dauth.h40 struct ssh;
106 int (*userauth)(struct ssh *, const char *);
129 int auth_password(struct ssh *, const char *);
131 int hostbased_key_allowed(struct ssh *, struct passwd *,
133 int user_key_allowed(struct ssh *ssh, struct passwd *, struct sshkey *,
153 void do_authentication2(struct ssh *);
155 void auth_log(struct ssh *, int, int, const char *, const char *);
156 void auth_maxtries_exceeded(struct ssh *) __attribute__((noreturn));
157 void userauth_finish(struct ssh *, int, const char *, const char *);
158 int auth_root_allowed(struct ssh *, const char *);
[all …]
H A Dauth2.c53 #include "ssh-gss.h"
88 static int input_service_request(int, u_int32_t, struct ssh *);
89 static int input_userauth_request(int, u_int32_t, struct ssh *);
136 userauth_banner(struct ssh *ssh) in userauth_banner() argument
147 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_BANNER)) != 0 || in userauth_banner()
148 (r = sshpkt_put_cstring(ssh, banner)) != 0 || in userauth_banner()
149 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* language, unused */ in userauth_banner()
150 (r = sshpkt_send(ssh)) != 0) in userauth_banner()
161 do_authentication2(struct ssh *ss argument
174 input_service_request(int type,u_int32_t seq,struct ssh * ssh) input_service_request() argument
259 input_userauth_request(int type,u_int32_t seq,struct ssh * ssh) input_userauth_request() argument
344 userauth_finish(struct ssh * ssh,int authenticated,const char * packet_method,const char * submethod) userauth_finish() argument
[all...]
H A Dsshd-session.c58 #include "ssh.h"
86 #include "ssh-gss.h"
162 struct ssh *the_active_state;
164 /* global key/cert auth options. XXX move to permanent ssh->authctxt? */
294 privsep_preauth(struct ssh *ssh) in privsep_preauth()
302 pmonitor->m_pkex = &ssh->kex; in privsep_preauth()
316 monitor_child_preauth(ssh, pmonitor); in privsep_preauth()
352 if (ssh_packet_get_connection_in(ssh) != STDIN_FILENO && in privsep_preauth()
353 dup2(ssh_packet_get_connection_in(ssh), STDIN_FILEN in privsep_preauth()
289 privsep_preauth(struct ssh * ssh) privsep_preauth() argument
356 privsep_postauth(struct ssh * ssh,Authctxt * authctxt) privsep_postauth() argument
469 get_hostkey_by_type(int type,int nid,int need_private,struct ssh * ssh) get_hostkey_by_type() argument
510 get_hostkey_public_by_type(int type,int nid,struct ssh * ssh) get_hostkey_public_by_type() argument
516 get_hostkey_private_by_type(int type,int nid,struct ssh * ssh) get_hostkey_private_by_type() argument
530 get_hostkey_public_by_index(int ind,struct ssh * ssh) get_hostkey_public_by_index() argument
538 get_hostkey_index(struct sshkey * key,int compare,struct ssh * ssh) get_hostkey_index() argument
565 notify_hostkeys(struct ssh * ssh) notify_hostkeys() argument
743 check_ip_options(struct ssh * ssh) check_ip_options() argument
772 set_process_rdomain(struct ssh * ssh,const char * name) set_process_rdomain() argument
801 struct ssh *ssh = NULL; main() local
1266 sshd_hostkey_sign(struct ssh * ssh,struct sshkey * privkey,struct sshkey * pubkey,u_char ** signature,size_t * slenp,const u_char * data,size_t dlen,const char * alg) sshd_hostkey_sign() argument
1286 do_ssh2_kex(struct ssh * ssh) do_ssh2_kex() argument
[all...]
H A Dkex.h132 struct ssh;
162 int (*verify_host_key)(struct sshkey *, struct ssh *);
163 struct sshkey *(*load_host_public_key)(int, int, struct ssh *);
164 struct sshkey *(*load_host_private_key)(int, int, struct ssh *);
165 int (*host_key_index)(struct sshkey *, int, struct ssh *);
166 int (*sign)(struct ssh *, struct sshkey *, struct sshkey *,
168 int (*kex[KEX_MAX])(struct ssh *);
190 void kex_proposal_populate_entries(struct ssh *, char *prop[PROPOSAL_MAX],
194 int kex_exchange_identification(struct ssh *, int, const char *);
197 int kex_ready(struct ssh *, cha
[all...]
H A Dclientloop.h40 struct ssh;
43 int client_loop(struct ssh *, int, int, int);
44 int client_x11_get_proto(struct ssh *, const char *, const char *,
46 void client_session2_setup(struct ssh *, int, int, int,
48 char *client_request_tun_fwd(struct ssh *, int, int, int,
54 void client_filter_cleanup(struct ssh *, int, void *);
55 int client_simple_escape_filter(struct ssh *, Channel *, char *, int);
58 typedef void global_confirm_cb(struct ssh *, int, u_int32_t, void *);
63 void client_expect_confirm(struct ssh *, int, const char *,
79 void muxserver_listen(struct ssh *);
[all …]
/openbsd-src/regress/usr.bin/ssh/unittests/sshkey/
H A Dmktestdata.sh89 ssh-keygen -t rsa -b 1024 -C "RSA test key #1" -N "" -f rsa_1 -m PEM
90 ssh-keygen -t dsa -b 1024 -C "DSA test key #1" -N "" -f dsa_1 -m PEM
91 ssh-keygen -t ecdsa -b 256 -C "ECDSA test key #1" -N "" -f ecdsa_1 -m PEM
92 ssh-keygen -t ed25519 -C "ED25519 test key #1" -N "" -f ed25519_1
93 ssh-keygen -w "$SK_DUMMY" -t ecdsa-sk -C "ECDSA-SK test key #1" \
95 ssh-keygen -w "$SK_DUMMY" -t ed25519-sk -C "ED25519-SK test key #1" \
99 ssh-keygen -t rsa -b 2048 -C "RSA test key #2" -N "" -f rsa_2 -m PEM
100 ssh-keygen -t dsa -b 1024 -C "DSA test key #2" -N "" -f dsa_2 -m PEM
101 ssh-keygen -t ecdsa -b 521 -C "ECDSA test key #2" -N "" -f ecdsa_2 -m PEM
102 ssh-keygen -t ed25519 -C "ED25519 test key #2" -N "" -f ed25519_2
[all …]
/openbsd-src/regress/usr.bin/ssh/
H A DMakefile122 failed-ssh.log failed-sshd.log hkr.* host.ecdsa-sha2-nistp256 \
124 host.ssh-dss host.ssh-ed25519 host.ssh-rsa \
131 rsa_ssh2_crnl.prv scp-ssh-wrapper.exe \
132 scp-ssh-wrapper.scp setuid-allowed sftp-server.log \
133 sftp-server.sh sftp.log ssh-log-wrapper.sh ssh.log \
134 ssh-agent.log ssh-add.log slow-sftp-server.sh \
135 ssh-rsa_oldfmt knownhosts_command \
148 ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
150 ssh-keygen -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv
152 ssh-keygen -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv
[all …]

12345678910