New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Windows 10 paste bash commands fails after issuing systemctl command
Anyone with Win 10 able to help solve this issue?
- on notepad write following commands:
echo "BEFORE" # runs
sudo systemctl restart sshd # runs
echo "AFTER" # never runs
- Copy above all 3 lines of text to clipboard and paste it entirely in either "
putty
" or built in "ssh
" or "ssh from WSL
" session to remote linux server. In all cases, while the screen shows that all 3 lines were pasted remotely, after thesystemctl
command exits successfully, no other pasted command is executed. In above script, the "AFTER
" never prints.
Issue: in all cases, the systemctl
command is issued, but all pasted commands following the systemctl
command never get executed.
Comments
It's not Windows specific. Try using semicolons instead of new lines.
echo "BEFORE"; sudo systemctl restart sshd; echo "AFTER"
I've run into it a lot but I've never sat down to try to figure out the cause. This seems to touch on it and a potential culprit:
https://bugzilla.redhat.com/show_bug.cgi?id=1753037
@jar Thanks! That sounds just about the right: bug in centos 7.6-7.7 (may affect RHEL 8 too?). Latest comment states that it is already fixed in fedora, scheduled for fix in next RHEL 7/8.