Commit Graph

36 Commits

Author SHA1 Message Date
Ryo Nakamura
ef8994d21e cache auth_bit_mask after the first none auth attempt
This fixes #36, password auth does not occur.
2025-11-08 18:50:44 +09:00
Ryo Nakamura
27ef4a127a try pubkey auth first instead of noauth
The libssh auth document suggets to call ssh_userauth_none() first to
obtain userauth list. However, it can lead PerSourcePenalties. Thus, try
pubkey auth first and try password and interactive auths next.
2025-08-12 19:34:31 +09:00
Ryo Nakamura
ab6649f29e add available ciphers and hmacs on help print (#20) 2024-04-29 18:03:41 +09:00
Ryo Nakamura
4ce62079cf add -J proxyjump option (#15) 2024-04-14 16:22:31 +09:00
Ryo Nakamura
e47d5b76e6 fix too few arguments for priv_set_errv 2024-04-13 19:26:15 +09:00
Ryo Nakamura
a1b9afefe5 add -o SSH_OPTION option 2024-04-12 23:08:22 +09:00
Ryo Nakamura
59b90d80bd drop -H disable host key checking option
It can be done by ssh_config instead.
2024-04-11 20:30:46 +09:00
Ryo Nakamura
9b8ba69a61 add ssh keyboard interactive authentication
Supporting keyboard-interactive authentication enables login with Cisco
DUO MFA (#2).
2024-03-31 16:47:55 +09:00
Ryo Nakamura
b2628b54fb add -4 and -6 options to use either IPv4 or IPv6 2024-02-07 15:14:27 +09:00
Ryo Nakamura
96084004b6 cleanup error message handling
The top-level funtion in a thread should print errors using
priv_get_err(), while lower-level functions should set error messages
using priv_set_err() except that error mesesages should be printed
immediately, e.g., under walk_src_path().
2024-02-07 13:29:45 +09:00
Ryo Nakamura
93f155cffe add .clang-format from Linux kernel and format sources
The exception is that ColumnLimit is 90.
2024-02-06 23:09:59 +09:00
Ryo Nakamura
4f0669f8f8 refactor error message-related functions
split message print fuctions (mpr_*), strerrno, and mscp_get/set_error
into print.c/h and strerrno.c/h.

ToDo: revise usages of priv_set_errv and pr_* functions.
2024-02-06 21:54:04 +09:00
Ryo Nakamura
9908fb309d passing options via pointers in mscp_ssh_opts
We do not need static buf because we have already dropped python biding
support.
2024-02-05 23:36:59 +09:00
Ryo Nakamura
9bdbfe8487 add SPDX-License-Identifier to source files 2024-01-18 12:59:49 +09:00
Ryo Nakamura
bf74aa095a add -g option to specify TCP cc algorithm
This commit introduce SSH_OPTIONS_CCALGO option to the libssh patch
and add -g CONGESTION option to mscp.
2023-11-01 19:54:18 +09:00
Ryo Nakamura
518aa42208 add -F ssh_config option 2023-08-04 13:31:10 +09:00
Ryo Nakamura
1b9ae51974 add message.h and message.c, mscp_set|get_error()
Instead of pr_err(), libmscp uses mscp_set_error() and
applications use mscp_get_errror() to get error message.
2023-03-03 21:29:43 +09:00
Ryo Nakamura
363296f499 add mscp_ssh_opts and change -C optarg 2023-03-03 16:50:06 +09:00
Ryo Nakamura
1be9b70808 start to impliment mscp as a library
this commit starts to refactor file.h|c to path.h|c and
add mscp.c|h. not completed yet.
2023-02-25 22:17:29 +09:00
Ryo Nakamura
c18fb6996f remove unnecessary pr_warn 2023-01-05 21:37:50 +09:00
Ryo Nakamura
289293e812 change prompt for ssh key passphrase 2022-12-05 22:27:53 +09:00
Ryo Nakamura
e1d14623f4 set TCP_NODELAY by default and introduce -N option to disable it 2022-12-04 21:32:48 +09:00
Ryo Nakamura
3b794ab51b remove unused code and introduce -b buf_sz option
This commit removes ifdef ASYNC_WRITE. So, mscp always depends on
the patched libssh.
2022-12-03 20:48:43 +09:00
Ryo Nakamura
5846c6b6a9 cache passphrase for private key for later connections. 2022-12-02 23:20:23 +09:00
Ryo Nakamura
03a3a6dc4b add auth callback for input passphrase of privkey 2022-12-02 22:28:56 +09:00
Ryo Nakamura
03b857b51a add -M hmac option 2022-12-02 21:13:13 +09:00
Ryo Nakamura
130e735e65 skip sftp_free() inappropriately 2022-11-27 19:48:13 +09:00
Ryo Nakamura
8cc964ca8a fix duplicate error message on ssh auth failed.
and fix the final \n with -q
2022-11-26 17:34:24 +09:00
Ryo Nakamura
8eb9e69c1c fix incorrect ret handling for read/write 2022-11-08 10:06:30 +00:00
Ryo Nakamura
243bf1fa57 add -H option to disable host key check
tests use this option.
2022-11-05 22:46:02 +09:00
Ryo Nakamura
65bdbdaede little refactoring for param names 2022-10-30 06:13:02 +00:00
Ryo Nakamura
c76fa3141d change indent from space to tab 2022-10-29 23:48:50 +09:00
Ryo Nakamura
79e717d1ed configurable sftp_buf_sz.
default value 131072 is derived from qemu/block/ssh.c.
we need more investigaion.
2022-10-23 21:43:44 +09:00
Ryo Nakamura
e6339bf464 cleanup copy codes 2022-10-23 19:11:07 +09:00
Ryo Nakamura
def9cfeba7 implement fill_file 2022-10-16 22:12:03 +09:00
Ryo Nakamura
303a9eb974 initial commit 2022-10-15 21:59:25 +09:00