LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-25-2009, 07:47 PM   #1
linux_newbie79
Member
 
Registered: Apr 2009
Posts: 36

Rep: Reputation: 15
calling user command during ssh login


Hi,

I am running sshd in my embedded platform and succesfully connected from remote-host using ssh client.

After entering correct username and password, I want to run my own command instead of prompt in the client side. what modifications do I need to do?

Help me in this regard

Thanks in Advance
 
Old 08-25-2009, 07:50 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200
What do you mean your own command? Can you be more specific?
 
Old 08-25-2009, 07:58 PM   #3
linux_newbie79
Member
 
Registered: Apr 2009
Posts: 36

Original Poster
Rep: Reputation: 15
my application executable in /sbin and I want to execute it automatically once the ssh login is completed. This application gets the user input and does specific task.
 
Old 08-25-2009, 08:06 PM   #4
linux_newbie79
Member
 
Registered: Apr 2009
Posts: 36

Original Poster
Rep: Reputation: 15
got it.

type the command in .profile

Thanks
 
Old 08-25-2009, 08:18 PM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200
You could copy your script to the remote system and issue:

Quote:
ssh user@host '/path/to/your/remote/script'
You could create an alias on your local system, eg my_remote_script = ssh user@host '/path/to.......'

edit: you've already solved it - I was too slow
 
  


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
SSH - cannot login as 1 particular user pnellesen Linux - Networking 7 11-25-2006 12:25 AM
ssh login without password for only one user zhjim Linux - Server 4 11-21-2006 05:31 PM
Add a new SSH login/user Temujin_12 Linux - Networking 2 12-31-2004 11:35 PM
HELP me on SSH User login manya Linux - Security 1 05-03-2004 04:56 PM
how can i restrick user to login with ssh? davidrios Linux - Networking 1 04-27-2004 06:59 PM


All times are GMT -5. The time now is 08:04 AM.

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