Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Arriving at a specified directory instead of the user's home |
|---|---|
| Date: | Tue, 13 Mar 2007 07:04:57 -0500 |
On Sat, Mar 10, 2007 at 05:10:18AM -0800, agostonbejo wrote:
By default when I ssh onto a machine, I arrive at the user's home directory. Can I somehow specify upon ssh'ing that I would like to arrive at a different one? Something like this: ssh -target-directory=~/local/mystuff user1@themachine password: ... user1@themachine:/local/mystuff # ...
ssh -t user1@themachine 'cd ~/local/mystuff && exec bash'
Keep in mind that since you are no longer running a login shell, you
may not have the full set of environment variables you expect (since
your /etc/profile and ~/.{bash_,}profile won't be sourced). You can
change that by forcing a login shell in the exec part.
If you don't use bash as your shell, substitute appropriately.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: Arriving at a specified directory instead of the user's home, Dr Yuri \"Joe\" Petkoswki |
|---|---|
| Next by Date: | Re: Arriving at a specified directory instead of the user's home, Greg Wooledge |
| Previous by Thread: | RE: Arriving at a specified directory instead of the user's home, Dr Yuri \"Joe\" Petkoswki |
| Next by Thread: | Key Authentication on Windows 2003 64 bit failing, James Norman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |