The IP-address, username and password in your example look pretty real. For showing examples of code it would be best if you obfuscated them in such manner that others would immediately see they are fake/example ones. There are a lot of people on the Internet that would actually try that combination of IP/username/passwd.
Some IMHO good examples would be:
- IP-addresses: 22.214.171.124, 10.10.10.10
- hostname: example.com
- password: fakepasswd, examplepasswd
- username: johndoe, joeuser, exampleuser
As for your actual problem: try replacing the '\r' with '\n', since that is the end of line character for UNIXes.