Well, not sure if I’m doing this right, but I just changed the last lines of the program to this:
command = "ssh"
args = ["-o", "StrictHostChecking=no", "-T", "user@192.168.x.x", "date"]
args.push "sshpass", "-p", passname unless passname.empty?
result = Process.run command, args, output: STDERR
I executed this again with the password and got no output again. Maybe I put STDERR in the wrong place?