LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2015, 09:00 AM   #16
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,801
Blog Entries: 11

Rep: Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103

Quote:
Originally Posted by joec@home View Post
what you are looking for is:

echo 'mkdir abcd' | sshpass -p 'MyPassWord' ssh root@1.2.3.4 bash
I'd suggest
Code:
mkdir -v abcd
to get a visual response during debugging.

This works for me here, where 'db' is a key-based alias for quick remote ssh to my dorkblog:
Code:
echo "mkdir -pv abcd" | db bash
mkdir: created directory abcd
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass contents of variable to curl command hattori.hanzo Programming 1 07-23-2013 01:09 AM
Pass a shell variable to an AWK command chogall Programming 1 12-23-2010 10:12 AM
How do you pass an expect command result into a variable and then use it again? edomingox Programming 2 05-09-2010 01:51 AM
How to pass a result of exec command in perl to a variable??? HyperTrey Programming 3 05-23-2008 12:47 PM
How do I pass a C variable to a Bash command ? Linh Programming 6 07-07-2003 03:12 PM


All times are GMT -5. The time now is 10:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration