SSH editing files on the server.

Hia all,
I have a remote server (accessed by SSH).
All is well. I connect via SSH run the editors/vim, and I correct all that is needed.
But here's the rub.
For a long time so you can not work. Not convenient.

I would like something like this:
# geany -p PORT [email]root@mysite.com:/usr/local/www/mysite.com[/email]/cgi-bin/index.c
I would like to work in devel/geany on my computer, and while maintaining the record to the server.

Do not know how to do so?

Then I decided to install sysutils/fusefs-sshfs.
Method is not as good as the one I described earlier, but even so....
Code:
# mkdir -p ~/sshmnt
# sshfs -C -p PORT root@mysite.com:/usr/local/www/mysite.com/cgi-bin/ ~/sshmnt
fuse: failed to open fuse device: No such file or directory

But the file is there, I just checked the :)

And as you're struggling with such issues?
 
Oh, thanks for the idea.
It was all just a little wrong.

Code:
# echo 'fusefs_enable="YES"' >> /etc/rc.conf
# /usr/local/etc/rc.d/fusefs start
Starting fusefs. 

# sshfs -C -p PORT root@mysite.com:/usr/local/www/mysite.com/cgi-bin/ ~/sshmnt
... ready!

Thank you very much!
 
Problems.......

Damn.
Now making
Code:
# cd ~/sshmnt
# geany index.c

- All good ... but after I pressed "Ctrl + S" - my computer reboot. x(
The last 10 minutes of recovering a system with fsck.

what? why?
This is just me?
 
I found a decent solution.
vim [url=scp://root@mysite.com:PORT//usr/local/www/mysite.com/cgi-bin/index.c]scp://root@mysite.com:PORT//usr/local/w ... in/index.c[/url]

I love editors/vim - all is well. One drawback:
1. Each time I save / open file I should enter password - annoying.

But it's better than what edit via console-ssh (not braking when entering characters).

If someone else has other suggestions - I will listen to them. Thank you!
 
doorways said:
I found a decent solution.
vim [url=scp://root@mysite.com:PORT//usr/local/www/mysite.com/cgi-bin/index.c]scp://root@mysite.com:PORT//usr/local/w ... in/index.c[/url]

I would suggest not running as root.
 
Hi, I had found a workaround to this behavior in geany in a blog. It works for me now:
1. In ~/.config/geany/geany.conf I've changed the value of use_gio_unsafe_file_saving to false and add other parameter not present; in short the two modified parameters are:

Code:
use_gio_unsafe_file_saving=false
use_safe_file_saving=true

2. To connect to the server I am using now:
Code:
sshfs -o workaround=rename  user@server:/path /path_to/mount_point

And that's it! I can use geany with sshfs now!

cheers
cuq
 
Back
Top