This is a discussion on Re: setting current dir of remote shell within the OpenSSH Development forums, part of the Networking and Network Related category; > Darren Tucker wrote: > It's not exactly the same as a login shell but it's close: > ... &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> Darren Tucker wrote:
> It's not exactly the same as a login shell but it's close: > ... > ssh -t someserver "cd `pwd` && exec $SHELL -" If the shell supports it then the -l extension (e.g. bash) can enable it to be a login shell and then it would be the same. ssh -t someserver "cd $(pwd) && exec -l $SHELL" However that does make for a funny looking $0. echo $0 -/bin/bash For me the following works: ssh -t someserver "cd $(pwd) && exec -l \$0" $ echo $0 -bash Bob _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org http://lists.mindrot.org/mailman/lis...enssh-unix-dev |