[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: sockets doubt - urgent



Hi Ramesh,

Well the telnet program talks to the host using the
TELNET protocol. Since you are just sending the
username and password, maybe the server just ignores
these data packets.

-Rohit
--- Ramesh <ramesh_tnj@xxxxxxxxx> wrote:
> hi all,
> 
> when i telnet to a machine and give the iusername
> and
> passwd.. and type a command "ls -l" means it will
> show
> the lsit of files in the current directory.
> 
> istead of going for telnet i want to go for my
> socket
> program. what i am doing is.. i create a socket
> first 
> and i fill the sockaddr structure with the
> destination
> machine IP address and the telent port(23).
> 
> now i send the username of the machine first using 
> send(sockfd,loginname,strlen(loginname),0) and
> checking for errno set. it works( means no errno set
> and the data is sent). simillarly the passwd also
> sent
> and finally i send the command in the above same
> way.
> 
> now ai m reading the port for any reply on the port
> using recv function. i dont find any reply and the
> errno is also not set.
>  iam not sure whether this logic is correct. can
> anybody guide me from here where i am missing the
> thing...
> 
> thanx in advacne...
> 
> ramesh
> 
> 
> __________________________________________________
> Do You Yahoo!?
> From homework help to love advice, Yahoo! Experts
> has your answer.
> http://experts.yahoo.com/
> 
> ---------------------------------------------
> Find out more about this and other Linux India
> mailing lists at http://lists.linux-india.org/


=====
Rohit Jaggi,
Member Of Technical Staff,
Persistent System Pvt. Ltd.,
email: rohit@xxxxxxxxxxxxxx 
web:www.rohitjaggi.com
call at: +91-20-5676700 extn(262)

__________________________________________________
Do You Yahoo!?