2010-04-24 56 views
1

默認情況下,當SSH進入客戶端時,我會自動放入/ home/marco /中,但是我想將其放入/ something/other。我寧願保留我的主目錄,但我希望被自動路由到/ something/other/SSH默認進入指定目錄?

這可能嗎?

*客戶端運行Debian的5.04

+0

完全重複:http://stackoverflow.com/questions/2593570 – 2010-04-25 08:12:06

回答

3

可以在SSH通過命令在你登錄的同時更改目錄:

ssh -t localhost "cd /tmp ; bash" 

你可能會得到你的別名後想要什麼:

alias ssh-tmp='ssh -t localhost "cd /tmp ; bash"' 

SO命令'SSH-TMP'會將你直接在tmp目錄。