telnet into X11

I am new to this so please be gentle. Anyway here is my question: Is there a way to write an applescript that would telnet into the X11 terminal (I do not know if it is called terminal)? Also could this command include user name and password so that I do not have to type it in everytime.

I have been tring different things but none work. Here is what I wrote so far:


tell application "X11"
	run
	if (count windows) is 0 then do script ""
	
	do script "telnet domain.com" in front window
end tell

Let me know what to do. Thank you in advance.