Answer the question
In order to leave comments, you need to log in
How to write a telnet connection command from linux to window with login and password recoding?
I have a Windows 8 computer with a configured telnet server. From another computer on Windows 7 it is possible to connect to it using the login and password "Julia" / "Rjat2000" How to connect from linux (bash)? I can't connect directly - apparently the problem is in the encoding. How to correctly recode the login and password and feed them to telnet?
#!/bin/bash
login=`echo "Юлия" | iconv -а UTF-8 -t KOI8-R`
password="Rjat2000"
host="192.168.1.42"
comand="nir mutesysvolume 2"
(
sleep 1
echo $password
sleep 1
echo $comand
) | telnet -l $login $host
Answer the question
In order to leave comments, you need to log in
And why do you recode in KOI8-R ?
For Windows, either CP1251 or CP866
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question