Ubuntu 22.04.3 LTS
SSH version 8.9p1-3ubuntu0.4
Here's the strace from a server where the sudo works (Rundeck responds with providing the password, masked here with # at the last line, rundeck is the username):
[pid 1969607] write(2, "[sudo] password for rundeck: ", 29) = 29
[pid 1969606] <... ppoll resumed>) = 1 ([{fd=10, revents=POLLIN}], left {tv_sec=59999, tv_nsec=686174456})
[pid 1969606] rt_sigprocmask(SIG_UNBLOCK, [CHLD], <unfinished ...>
[pid 1969607] read(0, <unfinished ...>
[pid 1969606] <... rt_sigprocmask resumed>[CHLD], 8) = 0
[pid 1969606] read(10, "[sudo] password for rundeck: ", 32768) = 29
[pid 1969606] getpid() = 1969606
[pid 1969606] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
[pid 1969606] ppoll([{fd=4, events=POLLIN}, {fd=4, events=POLLOUT}, {fd=10, events=POLLIN}], 3, {tv_sec=60000, tv_nsec=0}, [], 8) = 1 ([{fd=4, revents=POLLOUT}], left {tv_sec=59999, tv_nsec=999996560})
[pid 1969606] rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
[pid 1969606] write(4, "j6\206\314-\345AQ1O\33\204(\3\354\f\33{\322\234\362\353\230E\234\222\357\315&\236\273S\353\5\34S\274\v\17\324i\337\356:\316%\324\335'\324\271z>\270\372>{<\4\335\212\16\333\2329,f\314\331\261J\21\362\206i\347\314i\278", 80) = 80
[pid 1969606] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
[pid 1969606] ppoll([{fd=4, events=POLLIN}, {fd=4, events=0}, {fd=10, events=POLLIN}], 3, {tv_sec=60000, tv_nsec=0}, [], 8) = 1 ([{fd=4, revents=POLLIN}], left {tv_sec=59999, tv_nsec=662740088})
[pid 1969606] rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
[pid 1969606] read(4, "\244\326\22\344\203$fAx\236\354'\200:\341\0Q\232o\374t6\200\265\214\213\265}!#\375\315\241\rm\217\230\315\545\241\217\345q\366\304\335\34\233l*\230\tL{\37\334Z\25\245I\231\260\272\304\24\310S\327\260\340\3103-\251\23\217|\333\353;\252\366+/)A\255\254\304\315(\360+\221\35d", 262144) = 96
[pid 1969606] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
[pid 1969606] ppoll([{fd=4, events=POLLIN}, {fd=4, events=0}, {fd=10, events=POLLIN}, {fd=7, events=POLLOUT}], 4, {tv_sec=60000, tv_nsec=0}, [], 8) = 1 ([{fd=7, revents=POLLOUT}], left {tv_sec=59999, tv_nsec=999995370})
[pid 1969606] rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
[pid 1969606] write(7, "#################\n", 23) = 23
Here's the problematic server, where the prompt keeps open, password is never supplied and thus script never executes:
[pid 4159385] write(2, "[sudo] password for rundeck: ", 29) = 29
[pid 4159042] <... ppoll resumed>) = 1 ([{fd=10, revents=POLLIN}], left {tv_sec=59999, tv_nsec=710411812})
[pid 4159385] read(0, <unfinished ...>
[pid 4159042] rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
[pid 4159042] read(10, "[sudo] password for rundeck: ", 32768) = 29
[pid 4159042] getpid() = 4159042
[pid 4159042] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
[pid 4159042] ppoll([{fd=4, events=POLLIN}, {fd=4, events=POLLOUT}, {fd=10, events=POLLIN}], 3, {tv_sec=60000, tv_nsec=0}, [], 8) = 1 ([{fd=4, revents=POLLOUT}], left {tv_sec=59999, tv_nsec=999996084})
[pid 4159042] rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
[pid 4159042] write(4, "\303q\211I\272(\264\356\367\355\242\355\373\26\3k\2541\305\246\367\211d\243\211\n\2\7\256!\311\5A\373\300\321\226|:\224\256\311Y|=\263\327\327\316\457\5X\367\4\202\225\r\35\272\31\341\247\323x\365\356lL\216?\2B\276\360\24P\266L!\231", 80) = 80
[pid 4159042] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
[pid 4159042] ppoll([{fd=4, events=POLLIN}, {fd=4, events=0}, {fd=10, events=POLLIN}], 3, {tv_sec=60000, tv_nsec=0}, [], 8
(it stops here, no further processing of SSH)
I still have the old version 3.2.2 running and there's no issues there, same project, same script, same node configuration.
The problem I'm experiencing is a combination of server configuration and Rundeck but am wondering has the SSH plugin been modified in any way since 3.2.2 release (I haven't checked the release notes).
I will run a network dump now to see if Rundeck sends the password and it just not processed by SSH or does it never even send a password.
G.