setting current dir of remote shell
    Dave Yost 
    Dave at Yost.com
       
    Fri Apr 27 09:28:05 EST 2007
    
    
  
I have a command that will upload stuff from the current dir within a 
local copy of a web site to the corresponding dir on the web server.
http://Yost.com/computers/yostupload
The command has a -l argument that will log you in to the server via 
ssh.  So far so good.
But I would like this -l argument to set the current dir on the 
remote host so it is the dir corresponding to the current dir on the 
local host.
I can't see how to do that with ssh, and if I try something like the 
following, ssh barfs.
#!/bin/zsh
ssh foo.com <<< cd website/bar/baz <& 0
Seems to me that it would be useful for ssh to have an optional 
parameter that specifies an initial command to execute in the remote 
shell before turning over control to the local user.  I would use 
that option to run a cd command.
Thanks
Dave
    
    
More information about the openssh-unix-dev
mailing list