|
|
#1 | |||||||||||||||||||
|
MVP
Join Date: Jan 2002
Posts: 1,531
|
Edit file on remote server with BBEdit
I have to edit a lot of XML files on my Linux server on the LAN at my location. I am tired of editing via terminal and I would really like the BBEdit syntax coloring - so I was wondering if there was a way to use the BBEdit FTP function to accomplish this WITHOUT having to run an ftp server on the remote server machine just for that function.
I was playing around with the idea of SSH port forwarding - something like this I saw in an SSH forum:
Unfortunately it is not working. Whenever I watch the remote server I see: channel 2: open failed: connect failed: Connection refused I also know that MacSFTP allows editing via BBEdit - but not exactly - what it does is copy a file to the local machine, then you edit with BBEdit, and when you save it it transfers it back to the server. Does anyone know a way to get BBEdit to edit files on remote server? |
|||||||||||||||||||
|
|
|
|
|
#2 |
|
Triple-A Player
Join Date: Oct 2002
Location: Labadie, MO
Posts: 136
|
Well, you can't use BBEdit to connect via its ftp function...when there's no ftp server there.
So your options are either:
|
|
|
|
|
|
#3 |
|
Prospect
Join Date: Feb 2003
Posts: 2
|
It should work, but...
I haven't played with this yet, but I think you're on the right track. A couple of things to keep in mind however:
[list=1][*]You need to be root to forward privileged ports (of which 21 is one), so remember to sudo![*]In your sample code, you're forwarding local port 2025, and I'm not sure that BBEdit can do FTP on ports other than 21.[/list=1] I've actually been meaning to do something like this for a long time, but haven't gotten around to it -- I'll give it a shot and post something here if it works.
__________________
-- I am always an optimist, but frankly there is no hope. -- Hosni Mubarek |
|
|
|
|
|
#4 |
|
Prospect
Join Date: Feb 2003
Posts: 2
|
D'oh!
I just reread your post -- I had missed the part about there not being an FTP server running on the server. This will work only if ftpd is running on the server. It is useful in cases where insecure traffic is not allowed over the link, but the protocols still have to work.
I think that in your case the MacSFTP method is the best one -- if it works the way I think it does it should be pretty transparent.
__________________
-- I am always an optimist, but frankly there is no hope. -- Hosni Mubarek |
|
|
|
|
|
#5 |
|
MVP
Join Date: Jan 2002
Posts: 1,531
|
Thx for the replies. Its my server so I can certainly put any type of service on it I want - I just didn't really want to have an ftp server running all the time for simply editing text. Yet I know that sftp works - I use that all the time, I was thinking I could tunnel BBEdit over sftp so I wouldn't have to do any sort of new service.
|
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Jan 2003
Location: Bay Area
Posts: 327
|
Instead of tunneling BBEdit (I'm not sure what that would look like anyway) you can install netatalk on your Linux box and tunnel AFP over TCP.
Your ssh invocation would then look something like: Code:
ssh -L 2025:localhost:548 linuxbox afp://127.0.0.1:2025 to mount a share from the Linux box on your desktop. Use BBEdit to edit the file as if it were local. Breen |
|
|
|
|
|
#7 |
|
MVP
Join Date: Jan 2002
Posts: 1,531
|
I installed netatalk on the machine a while back and never had much luck with it. Anyway - tried above suggestion and still getting:
channel 2: open failed: connect failed: Connection refused on the linux box.. I am starting to think it might be some ssh problem... |
|
|
|
|
|
#8 |
|
Triple-A Player
Join Date: Jan 2002
Location: Cologne, Germany
Posts: 99
|
WebDAV comes to mind.
|
|
|
|
|
|
#9 |
|
MVP
Join Date: Jan 2002
Posts: 1,531
|
I think I have identified the problem is on the Linux box - when I start Netatalk - I am seeing a msg "AFP Daemon: login disallowed" - but I can not find WHERE to allow login. Have search everywhere, looked all through the configs and find no info about allowing and disallowing login.
Anyone know where that might be? |
|
|
|
|
|
#10 |
|
Major Leaguer
Join Date: Jan 2003
Location: Bay Area
Posts: 327
|
Dunno -- I've never had any problems with netatalk -- it just worked.
I'll look around when I get a chance. Breen |
|
|
|
|
|
#11 |
|
MVP
Join Date: Jan 2002
Posts: 1,531
|
Well I did finally get it up and running - I think the login problem was an error with teh tcp-wrappers. It drives me nuts though that I can not access as root - its a downfall of netatalk itself. Most of the stuff I need to do on my linux box is sysadmin stuff!
I tried getting around this adding my user name into the root group and giving root group access - then loggin in as that user. Still no go. Tried adding user to sys group, still no go. Without root access its not worth much to me since this linux box is only a server. I rarely ever login without loggin in as root. Any suggestions on how I could get in with netatalk and access all files? Also - how does one specify the root directory in the Applevolumes.default? I would like to offer the complete root volume as a choice. I tried: / root but that did not work. |
|
|
|
|
|
#12 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
BBOpenX 1.2.3...
|
|
|
|
|
|
#13 |
|
MVP
Join Date: Jan 2002
Posts: 1,531
|
Thx merv - that looks interesting but still requires an ftp connection on the remote side. I ended up enabling netatalk and samba and have been comparing the two of them. So far samba is winning out - I can get root access tomy files on the remote box.
|
|
|
|
|
|
#14 |
|
Prospect
Join Date: Jan 2002
Posts: 8
|
BBOpen for sure
If it weren't for BBOpen, I wouldn't use BBEdit. It's critical to be able to open files in BBEdit from the remote host command line. I always tunnel with ssh and have BBedit listen to localhost ports via an ftp bookmark. Ftp is running normally on the server *but only makes connections with localhost*. MacSFTP is second best but lacks the critical command line functionality
|
|
|
|
|
|
#15 |
|
Prospect
Join Date: Jan 2002
Location: Augusta, GA
Posts: 5
|
If you use RBroswer you can connect via sftp/ssh and just OPEN the file remotely with BBEdit. It works quite well with no special configuration beyond turning on Remote Access in your System Prefs/Sharing. (Note that I do not think the free version (RBrowserLite) does ssh.)
Very secure, very easy.
__________________
-- russh |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|