Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lawlist

macrumors member
Original poster
May 19, 2010
69
0
I'm able to login to the iphone with sshpass from the terminal, but not into a specific directory while logging in. Any help on the proper method to select a directory while logging in would be greatly appreciated.

Works: sshpass -p 'alpine' ssh -p '2222' root@localhost

Doesn't Work: sshpass -p 'alpine' ssh -p '2222' root@localhost:/var

When it doesn't work, there is no error message, it just appears to do nothing and I am not returned to a command prompt.
 
Here is a working method, however, I have another problem now because a semicolon cannot be used in `elisp` since it is a comment delimiter. I'm trying to write an `elisp` function that will synchronize with the iphone using rsync.

/Users/HOME/.0.data/.0.emacs/elpa/bin/sshpass -p 'alpine' ssh -p '2222' -l root localhost -t "cd /var/mobile/Applications/F30B1574-5979-4764-8742-7F9DB2863094/Documents/.0.data; bash --login"
 
Issue resolved -- here is another way to write it without using a semicolon

/Users/HOME/.0.data/.0.emacs/elpa/bin/sshpass -p 'alpine' ssh -p '2222' -l root localhost -t "cd /var/mobile/Applications/F30B1574-5979-4764-8742-7F9DB2863094/Documents/.0.data && bash --login"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.