Find the answer to your Linux question:
Results 1 to 2 of 2
HEllo All , I am trying to SSH onto a remote server and execute a command on it. if i do it in two steps, 1st step for simple ssh ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    17

    SSH issues with a remote server


    HEllo All ,
    I am trying to SSH onto a remote server and execute a command on it. if i do it in two steps, 1st step for simple ssh and as a second step executing the actual command on the machine, it all works fine.
    But if i try to do it one line as follows:
    <<<<< ssh -l user 10.127.67.36 "show sip invite" >>>>>>>>>
    It does not work and i receive the following message after i enter the password:
    Received disconnect from 10.127.67.36: 11: Logged out

    Please suggest, what could be the issue here.
    Thanks in advance.
    Nitesh Bansal

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Syntax for running command on a remote host:
    Code:
    ssh [USER-NAME]@[REMOTE-HOST] [command or script]

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •