rbbedit
rbbedit copied to clipboard
What's the difference between host_sftp_host and bbedit_ssh_host?
Would you explain the settings in more detail, please? I can't get this to work.
1] What's the difference between host_sftp_host and bbedit_ssh_host? I'm assuming that host_sftp_host is my server, but I don't know what to put for bbedit_ssh_host. If I use an IP address for it, the script hangs. Any other input and it gets added to my server's known_hosts file.
2] What is local_ssh_copy_id_command? You have "ssh-copy-id" as the default, but I don't have that command on either my Mac or my server.
Hopefully I can get this to work. I'd really like to try it out since BBEdit is my favorite text editor.
Thanks! Marc
1] What's the difference between host_sftp_host and bbedit_ssh_host? I'm assuming that host_sftp_host is my server, but I don't know what to put for bbedit_ssh_host. If I use an IP address for it, the script hangs. Any other input and it gets added to my server's known_hosts file.
When using rbbedit
, it first sends a command (via ssh) to your BBEdit workstation, which is defined by bbedit_ssh_host
. That command calls rbbedit
which (by default) opens the file from host_sftp_host
. The script tries to set default values for each of those, but can get it wrong for many reasons, in which case you need to set them yourself.
-
bbedit_ssh_host
is the machine running BBEdit (your workstation) - it can be an IP address or hostname, and must be accessible from thehost_sftp_host
- a common value is the public IP address (or dyndns) of your home LAN. -
host_sftp_host
is the machine that has the file you want to edit - it must be accessible frombbedit_ssh_host
.
Since rbbedit
is (by default) just using ssh/sftp, the easiest way to confirm the setup is to manually test ssh:
remote_host> ssh <bbedit_ssh_user>@<bbedit_ssh_host>
and:
workstation> sftp <host_sftp_user>@<host_sftp_host>:/path/to/file ./file
If those commands work, then rbbedit
should work.
2] What is local_ssh_copy_id_command? You have "ssh-copy-id" as the default, but I don't have that command on either my Mac or my server.
I think that's a separate util, maybe available via brew
. You don't really need it, unless you are setting up lots of remote hosts. For just one or two hosts, manually copy your public ssh key to .ssh/authorized_keys
on remote host, and copy public key from remote host to .ssh/authorized_keys
on your workstation.
Note, it's possible to use ssh "restricted command" if you don't want to create wide open bi-directional access.
Hopefully I can get this to work. I'd really like to try it out since BBEdit is my favorite text editor.
Underneath, rbbedit
isn't doing anything special, it's just automating the ssh/sftp commands for you. So get ssh/sftp working, and then if you still have problems with rbbedit
, send me more details.
If any of the above helps you understand how rbbedit
works, and you think the docs could be improved, Please update the README and create a PR.