Results 1 to 4 of 4
Thread: Multiple commands via SSH
-
11-12-2006, 07:38 AM #1Web Hosting Master
- 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
-
11-12-2006, 08:21 AM #2Web Hosting Master
- Join Date
- Apr 2003
- Location
- UK
- Posts
- 2,569
im not sure you can actually...
whats wrong with doing it in 2?
-
11-12-2006, 08:33 AM #3Web Hosting Master
- Join Date
- Apr 2002
- Location
- Auckland - New Zealand
- Posts
- 1,575
Not quite sure what you need but does
&&
instead of ; help ?
-
11-12-2006, 08:50 AM #4Web Hosting Master
- 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