Skip to content

Commit e22ce50

Browse files
committed
add timeout (#21)
1 parent bfd38f0 commit e22ce50

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/ssh-honeypot.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,11 @@ int main (int argc, char *argv[]) {
606606
port,
607607
getpid());
608608

609+
// https://github.com/droberson/ssh-honeypot/issues/21
609610
session = ssh_new ();
611+
long timeout = 5;
612+
ssh_options_set(session, SSH_OPTIONS_TIMEOUT, (void *)&timeout);
613+
610614
sshbind = ssh_bind_new ();
611615

612616
ssh_bind_options_set (sshbind, SSH_BIND_OPTIONS_BINDADDR, bindaddr);

0 commit comments

Comments
 (0)