Thread: Remote login

  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    3

    Remote login

    I was using exec over TCP to connect to a remote server.i was using send,recv functions to get success/failure of the login on passing username and password.
    i was getting a message some thing like on invalid login:
    msg:
    [compat]: 3004-300 You entered an invalid login name or password.

    rexecd: 0826-604 The login is not correct.

    But wen i tried to use ssh instead of exec i am getting a message something like:
    SSH-1.99-OpenSSH_3.9p1
    for both correct as well as wrong login details.is there a way in which my code runs in a similar way as exec even with ssh returning an error msg for wrong login details?

  2. #2
    Registered User
    Join Date
    Jul 2008
    Posts
    26
    SSH isn't a text-based system, it's an encrypted data stream. What you are seeing is the welcome message.

  3. #3
    Registered User
    Join Date
    Jan 2011
    Posts
    3
    Quote Originally Posted by Mole42 View Post
    SSH isn't a text-based system, it's an encrypted data stream. What you are seeing is the welcome message.
    Yeah i understand that,all i need to know is if there is a way to authenticate using send,recv methods.Also i would like to know if there is any alternative to implement this functionality

  4. #4
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    No, not the way you're thinking (at least, not the way I understand your question). SSH uses SSL, meaning that the data being written via send and read via recv is encrypted via whatever method was setup in the SSL connection. The simple act of "sending" a packet over SSH, or any SSL connection can involve reading and writing of data over sockets. You would have to use an SSL library to connect (openssl comes to mind), read and write. After that, you would have to do whatever the SSH protocol is expecting for login. Unfortunately, I know nothing about the SSH protocol.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 12-08-2009, 12:55 PM
  2. Remote debug not working in Visual Studio 2003
    By Bassquake in forum Tech Board
    Replies: 12
    Last Post: 08-22-2008, 12:11 PM
  3. Howto make own application for remote control handling
    By s-men in forum Windows Programming
    Replies: 16
    Last Post: 08-16-2008, 04:22 PM
  4. Remote thread problem
    By RubbeR DuckY in forum C++ Programming
    Replies: 6
    Last Post: 08-08-2006, 12:24 PM
  5. Replies: 7
    Last Post: 07-19-2002, 11:49 AM