LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   calling user command during ssh login (https://www.linuxquestions.org/questions/linux-newbie-8/calling-user-command-during-ssh-login-750226/)

linux_newbie79 08-25-2009 06:47 PM

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

sycamorex 08-25-2009 06:50 PM

What do you mean your own command? Can you be more specific?

linux_newbie79 08-25-2009 06:58 PM

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.

linux_newbie79 08-25-2009 07:06 PM

got it.

type the command in .profile

Thanks

sycamorex 08-25-2009 07:18 PM

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:)


All times are GMT -5. The time now is 09:23 AM.