Hi, Can I send ssh request to sshd to prompt for username along with password. Ex: cogan at localhost$ ssh myserver Login:xyz password: Login is automatically taken as cogan, wanted to ignore this and instead prompt login and take it from user, Please suggest. Best Regards,
Hi, Can't you just use the user at server syntax or even the -l flag? cogan at localhost$ ssh xyz at myserver cogan at localhost$ ssh -l xyz myserver * On Thursday, January 19, 2017 at 10:21 PM +0530, Sudarshan Soma <sudarshan12s at gmail.com> wrote:> Hi, Can I send ssh request to sshd to prompt for username along with > password. > > Ex: > > cogan at localhost$ ssh myserver > > Login:xyz > password: > > > Login is automatically taken as cogan, wanted to ignore this and > > instead prompt login and take it from user, Please suggest. > > > Best Regards,
No. I am trying to invoke ssh command from my code something like system("ssh ip -p <port>") as custom action and would want the sshd to handle Login screens (prompting user/passwd., etc) . Best Regards, On Thu, Jan 19, 2017 at 10:26 PM, Ziirish <ziirish at ziirish.info> wrote:> Hi, > > Can't you just use the user at server syntax or even the -l flag? > > cogan at localhost$ ssh xyz at myserver > cogan at localhost$ ssh -l xyz myserver > > * On Thursday, January 19, 2017 at 10:21 PM +0530, Sudarshan Soma < > sudarshan12s at gmail.com> wrote: > > Hi, Can I send ssh request to sshd to prompt for username along with > > password. > > > > Ex: > > > > cogan at localhost$ ssh myserver > > > > Login:xyz > > password: > > > > > > Login is automatically taken as cogan, wanted to ignore this and > > > > instead prompt login and take it from user, Please suggest. > > > > > > Best Regards, >
On Fri, Jan 20, 2017 at 3:51 AM, Sudarshan Soma <sudarshan12s at gmail.com> wrote:> Hi, Can I send ssh request to sshd to prompt for username along with > password.This is purely a function of the client not the server. It is possible within the protocol (PuTTY for example does it) but OpenSSH's client doesn't support it. You can trivially script it as noted elsewhere in this thread, though. -- Darren Tucker (dtucker at zip.com.au) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Thanks so much. It helps. On Fri, Jan 20, 2017 at 4:02 AM, Darren Tucker <dtucker at zip.com.au> wrote:> On Fri, Jan 20, 2017 at 3:51 AM, Sudarshan Soma <sudarshan12s at gmail.com> > wrote: > > Hi, Can I send ssh request to sshd to prompt for username along with > > password. > > This is purely a function of the client not the server. It is > possible within the protocol (PuTTY for example does it) but OpenSSH's > client doesn't support it. You can trivially script it as noted > elsewhere in this thread, though. > > -- > Darren Tucker (dtucker at zip.com.au) > GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) > Good judgement comes with experience. Unfortunately, the experience > usually comes from bad judgement. >