Good evening.
I've written up a HOWTO on a remote editing via ssh workaround for TextMate.
Thought I'd ask for some feedback. I was thinking it may be good under the Wiki perhaps?
http://berserk.org/2005/10/08/textmate-and-a-remote-editing-workaround/
Take care,
Cameron.
It seems to me a better solution would be to use rsync to sync the whole project back and forth. You'd just need two commands: "Sync from server" and "Sync to server", and 2 env vars, $REMOTE_SERVER_HOST and $REMOTE_SERVER_PATH (with an optional $REMOTE_SERVER_USER). Then your sync commands can use rsync to sync to and from the remote path, using the root of the current project as the place to sync with. You simply save a TextMate project with the root at the appropriate folder and define these 2 env vars on that project (as opposed to globally within TextMate). This way you can add and remove files, and edit several files, then sync them all at once.
On Oct 8, 2005, at 11:49 PM, Cameron Mallory wrote:
I've written up a HOWTO on a remote editing via ssh workaround for TextMate.
Thought I'd ask for some feedback. I was thinking it may be good under the Wiki perhaps?
http://berserk.org/2005/10/08/textmate-and-a-remote-editing- workaround/
I agree that using rsync will make it more usable, since it is often that you're working on more than one file and you don't want to go through the hassle of locating each one that needs to be uploaded.
However, I'm in a position where the system administration of the server where I can keep files do not support SSH keys. They have the strict attitude that it is not safe to have passwords in files[1]. So I need a way to feed the password to the command before it fires up and I don't really want to hardcode this into a command. Does anyone know of a nice way of using a dialog to get the password and feed it to the command when needed ?
Jeroen.
[1]: In the case of stupid users who don't use a passphrase and are pretty careless with files, I can agree with their point. However, my opinion is that SSH Keys are inherently not less secure than passwords or easier to lose. But I've been unsuccesful yet in convincing them of this fact.
On Oct 10, 2005, at 4:27 AM, Jeroen van der Ham wrote:
I agree that using rsync will make it more usable, since it is often that you're working on more than one file and you don't want to go through the hassle of locating each one that needs to be uploaded.
However, I'm in a position where the system administration of the server where I can keep files do not support SSH keys. They have the strict attitude that it is not safe to have passwords in files[1].
Well that's silly. You'd have to be phenomenally stupid to give out you private key and it doesn't matter if your public key gets loose. Plus, since the .ssh directory *has* to be readable *only* by you in order for keys to work, it's not like other people can waltz in and take them. Passwords are far less secure. And the key is even better if you use a passphrase with the key.
So I need a way to feed the password to the command before it fires up and I don't really want to hardcode this into a command. Does anyone know of a nice way of using a dialog to get the password and feed it to the command when needed ?
I've been poking around and there's an env var called SSH_ASKPASS that's supposed to make ssh get it's password by executing a command (you'd use it with CocoaDialog), but I can't get it to actually do anything.
I think your best bet is to convince the sysadmin that SSH keys are more secure than passwords.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Oct 10, 2005, at 3:29 AM, Kevin Ballard wrote:
I've been poking around and there's an env var called SSH_ASKPASS that's supposed to make ssh get it's password by executing a command (you'd use it with CocoaDialog), but I can't get it to actually do anything.
SSH_ASKPASS only works for pass phrases to keys. And ssh asks for passwords using the controlling tty, not stdin. The only way to make ssh use transparent is by using public/private keys.
Regards,
- -Oscar
- -- pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
On 10/10/2005, at 10.27, Jeroen van der Ham wrote:
Does anyone know of a nice way of using a dialog to get the password and feed it to the command when needed ?
This might do the trick for you : http://www.sshkeychain.org/
On Oct 10, 2005, at 11:42 AM, David Jack Olrik wrote:
On 10/10/2005, at 10.27, Jeroen van der Ham wrote:
Does anyone know of a nice way of using a dialog to get the password and feed it to the command when needed ?
This might do the trick for you : http://www.sshkeychain.org/
I've been using SSHKeychain for a long while now, and while it does prompt for key passphrases, it does not prompt for ssh passwords (for servers with which you do not have a key pair set up). I thought it might, but I tested and it doesn't. And when I think about it, it makes sense - SSHKeychain is managing an ssh-agent process, but if ssh-agent only provides keys, it doesn't provide passwords, so if the keys fail then SSHKeychain isn't asked for the password.
On 10/8/05, Cameron Mallory cmallory@berserk.org wrote:
Good evening.
I've written up a HOWTO on a remote editing via ssh workaround for TextMate.
Thought I'd ask for some feedback. I was thinking it may be good under the Wiki perhaps?
You had me all excited for a while there but your solution will only work if you only ever edit your remote files from a single Mac otherwise you are going to end up with things out of synch and getting a new tar ball everytime you want to work locally would really take away from the conveience factor.
Instead I find using CyberDuck for SFTP and setting it up so a double click opens the file in TextMate works a lot better, it is just a pain that it is two separate programs and editing multiple files can be a bit of a pain.
How hard would it be to embed CyberDuck's FTP browser (or something similar) into TextMate's Project browser or is that what is planned for 1.2?
Regards, -- Jason Bainbridge http://kde.org - webmaster@kde.org Personal Site - http://jasonbainbridge.com
On 10 Oct 2005, at 15:27, Jason Bainbridge wrote:
You had me all excited for a while there but your solution will only work if you only ever edit your remote files from a single Mac otherwise you are going to end up with things out of synch and getting a new tar ball everytime you want to work locally would really take away from the conveience factor.
Umm, it really sounds like the solution you're looking for is some kind of revision control system (subversion, cvs)? Maybe along with a trigger on commit to update the remote files? In which case, TextMate already supports svn out the box...
On 10/10/05, Graeme Mathieson mathie@woss.name wrote:
On 10 Oct 2005, at 15:27, Jason Bainbridge wrote:
You had me all excited for a while there but your solution will only work if you only ever edit your remote files from a single Mac otherwise you are going to end up with things out of synch and getting a new tar ball everytime you want to work locally would really take away from the conveience factor.
Umm, it really sounds like the solution you're looking for is some kind of revision control system (subversion, cvs)? Maybe along with a trigger on commit to update the remote files? In which case, TextMate already supports svn out the box...
Not really, that works for some situations but I don't really want to put every remote site I work on in a SVN repository, especially when the sites themselves can consist of multiple SVN checkouts (yes I know you can work around that but just to enable remote editing it is a bit of a pain). Plus you would still need to do a svn co before every editing session, not a big deal but still reduces the convenience factor.
I'm just spoiled with KDE's kioslaves and when I get around to setting it up that new SSH file system on Linux.
Regards, -- Jason Bainbridge http://kde.org - webmaster@kde.org Personal Site - http://jasonbainbridge.com