Reputation: 35
ssh [email protected] 'more /home/GJMEHUL/.bash_history > /home/GJMEHUL/smsc_cmdlog_12Apr12_GJMEHUL.txt'
The above command which i've stored in a script called alarmtest.sh. Ive already set ssh keys. the problem is even though the command is doing its job it does not stop and I have to manually kill it using Ctrl+C.
When I tried the command below in a script:
ssh [email protected] 'who > /home/GJMEHUL/smsc_cmdlog_12Apr12_GJMEHUL.txt'
it worked perfectly.
Why is ssh command behaving like this?
Upvotes: 2
Views: 547
Reputation: 1143
You use "more", which waits for user interaction. Maybe you'd rather like to use cat or a simple cp?
Upvotes: 1