LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 06: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, 06:50 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
What do you mean your own command? Can you be more specific?
 
Old 08-25-2009, 06: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, 07: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, 07:18 PM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 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
Open Source Consulting | Domain Registration