Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Windows 10 paste bash commands fails after issuing systemctl command
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.

Windows 10 paste bash commands fails after issuing systemctl command

Anyone with Win 10 able to help solve this issue?

  1. on notepad write following commands:

echo "BEFORE" # runs
sudo systemctl restart sshd # runs
echo "AFTER" # never runs

  1. 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 the systemctl command exits successfully, no other pasted command is executed. In above script, the "AFTER" never prints.

Issue: in all cases, the systemctlcommand is issued, but all pasted commands following the systemctlcommand never get executed.

Comments

  • jarjar Patron Provider, Top Host, Veteran

    It's not Windows specific. Try using semicolons instead of new lines.

    echo "BEFORE"; sudo systemctl restart sshd; echo "AFTER"

  • jarjar Patron Provider, Top Host, Veteran

    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

    Thanked by 1aFriend
  • @jar said:
    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.

Sign In or Register to comment.