Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,616

    Multiple commands via SSH

    Heres one I've been scratching my head over. I want to login to a machine, run a command and then excute a shell.

    So far I've got
    e.g.

    ssh root@server1.a2b2.com " ps -ef ; bash -i -l"

    This sorta of works but gives me a bash shell that has no job control

    Anyone got any better ideas?
    Russ Foster - Industry Curmudgeon
    Freelance Sysadmin for Hire - email vaserv@gmail.com

  2. #2
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,569
    im not sure you can actually...

    whats wrong with doing it in 2?

  3. #3
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,575
    Not quite sure what you need but does

    &&

    instead of ; help ?

  4. #4
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,616
    What I'm looking to ultimatly do is pass the result of one command to another and then after spawn a shell whatever the result. Its just the shell part that is being annoying atm
    Russ Foster - Industry Curmudgeon
    Freelance Sysadmin for Hire - email vaserv@gmail.com

Posting Permissions

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