Fixed up version with slight monkeypatch to remove PTY from ssh