Bug ID 1163200
Summary SSH process often not "Entering interactive session" when executed by script
Classification openSUSE
Product openSUSE Distribution
Version Leap 15.1
Hardware x86-64
OS SUSE Other
Status NEW
Severity Normal
Priority P5 - None
Component Network
Assignee bnc-team-screening@forge.provo.novell.com
Reporter Stefan.Welscher@telekom.de
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

I have a script which dynamically creates a tunnel to a destination only
reachable by a intermediate hop.
This is done using the following command on a session with "raw" and "-echo":

/usr/bin/ssh -N -f -4 -o PreferredAuthentications=password -o
ExitOnForwardFailure=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=2 -L
localport:ipv4_destination_address:22 user@ipv4_hop_adress 2>&1 && echo
EXPECT_EOF

When executing this command manual via bash, it always works without any
problems.
When executing this command via script (perl/Expect.pm) it sometimes works and
sometimes doesn't (in cases it doesn't work, no corresponding local ssh process
is listed on ps), but as far as I could see on my tests, it alwayss works if I
respawn the command on the same script immideately after, if the process is
missing. This is a workaround, but it takes some time.

On the debug output (-vvv), in cases the command doesn't work, the last two
debug lines are missing:

...
debug1: Local forwarding listening on 127.0.0.1 port 10003.
debug2: fd 4 setting O_NONBLOCK
debug3: fd 4 is O_NONBLOCK
debug1: channel 0: new [port listener]
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: forking to background
debug1: Entering interactive session. <--- missing if failed
debug1: pledge: network <--- missing if failed
EXPECT_EOF

All other debug lines are exactly the same.


You are receiving this mail because: