Simultaneously try to execute commands after connecting to remote account to one account

Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Simultaneously try to execute commands after connecting to remote account to one account

I have made password less connection to my remote account. and i tried to execute commands at a time. but i am unable to execute the commands.



Code:
ssh $ACCOUNT_DETAILS@$HOST_DETAILS

cd  ~/JEE/*/logs/


Last edited by Scrutinizer; 03-03-2016 at 08:41 AM.. Reason: code tags
# 2  
The script runs command after command. The cd runs after the ssh has finished.
You can put simple remote commands as arguments to the ssh
Code:
ssh $ACCOUNT_DETAILS@$HOST_DETAILS "
cd  ~/JEE/*/logs/
ls
"

Or pass a local script. See my proposal in this thread.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
What happens to your skype account if you close outlook.com email account?
milhan
Hello, Does anyone know what happens to your skype account if you close the outlook.com email account which are linked together? As you know they are both owned by Microsoft. Thanks... Windows & DOS: Issues & Discussions
0
Windows & DOS: Issues & Discussions
Apply disk quota to account(dedicate 3 GB to account).
ashokd009
Hi , I am faceing lot of problem due to "disk space is not enough". senerio is like as, In system has 5 account. a,b,c,d,e say account c if very critical. Due to other user's data, user 'c' is faceing disk space issue. I want to dedicate 3 GB for user 'c'. No user...... Linux
1
Linux
Execute a file from a different account
DemonGal711
Okay, I have this homework assignment, and I think I have it all down path, but I just need help with this one line. Write a C Shell script that can be run under any CECS unix account and the script produces the following three lines output on the screen. Requirements 1. The first line in the...... UNIX for Dummies Questions & Answers
0
UNIX for Dummies Questions & Answers
Change Account to not lock account if password expires
stringzz
I have access to 15+ UNIX boxes at work, and I do not consistently log onto all of them over time. When I do try to access one I havent been on in awhile, my account is locked as the password has expired. I need to request to the UNIX SA's that the password expiration is 90 days and that if it...... UNIX for Dummies Questions & Answers
1
UNIX for Dummies Questions & Answers

Featured Tech Videos