Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-08-2015, 10:00 AM   #16
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled

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

echo 'mkdir abcd' | sshpass -p 'MyPassWord' ssh root@ bash
I'd suggest
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:
echo "mkdir -pv abcd" | db bash
mkdir: created directory abcd
1 members found this post helpful.


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 02:09 AM
Pass a shell variable to an AWK command chogall Programming 1 12-23-2010 11:12 AM
How do you pass an expect command result into a variable and then use it again? edomingox Programming 2 05-09-2010 02:51 AM
How to pass a result of exec command in perl to a variable??? HyperTrey Programming 3 05-23-2008 01:47 PM
How do I pass a C variable to a Bash command ? Linh Programming 6 07-07-2003 04:12 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:58 AM.

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