Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

RE: Running a user command instead of shell in sshd

From: Anurag Bhatia <Anuragb(at)ami.com>
Date: Mon Jun 16 2003 - 12:44:39 EDT


Hello Robert,
I tried the solution u suggested by writing a simple program and executing it. It worked :-) As u said, it's good only for public-key based authentication.
But in my implementaion, I need password-based authentication also enabled in the case when keys are not present. Is there a way which gets us the same result irrespective of authentication method used? Regards,
Anurag

-----Original Message-----
From: Robert.Baskerville@Vistorm.com [mailto:Robert.Baskerville@Vistorm.com]

Sent: Monday, June 16, 2003 11:49 AM
To: Anuragb@ami.com
Subject: RE: Running a user command instead of shell in sshd

You specify the command on the SERVER in the authorized_keys file. No good if you're using passwords, but passwords belong to the stone-age anyway.

Example:

no-port-forwarding,command="scp -f pkg.tgz" 1024 35 15380763064275803165825574359049772824482811179327377929246 8902015107913367648771042550704772130037344261274761833680034685759921953391 86434023976829367961081195503291034931157525770429044778 6782238764274893693462281170070804057659618701271979929297525220661548449357 8976689459659332801317258899691289 root@spike

This specific example actually only works if you are forcing them to copy a particular file with scp. Whatever file they specify, they will ONLY get the one specified above :-)

You can have other commands though - and the session exists when the command does. If you have ONE user who needs to be able to do one of TWO commands, then get them to use two different identities and specify one command for each of the two public keys.

Do you need help?X

Robert Baskerville

-----Original Message-----
From: Anurag Bhatia [mailto:Anuragb@ami.com] Sent: 16 June 2003 14:44
To: Sumit Malhotra; SSH list
Subject: RE: Running a user command instead of shell in sshd

Hi,
I know that if the command name is given while contacting server, it's executed on server.
What if I don't want to specify any command name when running ssh? I just want to do "ssh <IP>" and instead of running shell, a command is excuted on server.
Any links????
Regards,
Anurag

-----Original Message-----
From: Sumit Malhotra [mailto:smalhotra@burgundyinfotech.com] Sent: Monday, June 16, 2003 1:53 AM
To: Anurag Bhatia; SSH list
Subject: RE: Running a user command instead of shell in sshd

Hi anurag ,

The ssh syntax is this :

ssh username@<machine name of IP> <command to be exceuted at the remote end>

If the command is not given it request for shell.

Do you need more help?X

-regards,
Sumit

-----Original Message-----
From: Atanas Dimitrov [mailto:atanas_dimitrov@bobcat.gcsu.edu] Sent: Saturday, June 14, 2003 10:23 AM
To: Anurag Bhatia; SSH list
Subject: Re: Running a user command instead of shell in sshd

It is refering to an actual scenario when "the client either requests a shell or execution of a command" The case when the client is requesting ae execution command is specified by
the client so you should be using "man ssh" for more info on this feature
which is the encrypted version of the rsh remote commmand execution.

:-)

On Friday 13 June 2003 05:33 pm, Anurag Bhatia wrote:
> Hi all,
> "man sshd" talks about ssshd starting user's shell or COMMAND after
login
> process is successsful.
> Where can we specify whether to run user's shell or any other command?
>
> Regards,
> Anurag Bhatia



***
The contents of this email and any attachments may be confidential. It is intended for the named recipient(s) only. If you are not the named recipient, please notify the sender immediately and do not disclose the contents to any other person or make any copies. Vistorm monitors communications.

ISO 9001 Registered Firm Certificate Number GB 10940



*** Received on Mon Jun 16 15:10:14 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:59 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library