Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Remot-admin (SFTP/SSH)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Tobias_R
n00b
n00b


Joined: 10 Nov 2003
Posts: 13

PostPosted: Sun Dec 14, 2003 4:59 pm    Post subject: Remot-admin (SFTP/SSH) Reply with quote

Hi!

I have set up a network running Linux/Gentoo at a school here in sweden. I have set up a SSH deamon on the server-machine thru wish I can ssh to the clients from home.


So, my question is:
Is there any better way of remote-admin a network than just using SSH / SFTP?
Its kind of timeconsuming to download, edit in GUI editor, and uploading again. Would be better to edit the files ON the server. I kind of recon that Konqeror in KDE could do this over SSH, though I'm not sure. I'm now running XFCE wich I really like so running KDE is not an option. (I can sccept having KDE installed, using it features that KDE provides thru XFCE if thats possible.

I have tried VNC a long time ago without any luck (didnt work if I remeber it right.)

I appreciate any help or ideas!

Best regards
Tobias Radenholt, Sweden
Back to top
View user's profile Send private message
fidzysss
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2003
Posts: 109
Location: Paris (France)

PostPosted: Sun Dec 14, 2003 5:11 pm    Post subject: Reply with quote

Code:
ssh -X user@machine

is what you're looking for: it let you export the display from the remote host to the one initiating the connection. It works in all environnement, you just need a X server.
but the best way, if you just need to edit a few file is to use console editor (nano, vi or emacs) : it consumes far less bandwidth than forwarding X application
Back to top
View user's profile Send private message
cselkirk
Apprentice
Apprentice


Joined: 09 Jun 2003
Posts: 199
Location: NL

PostPosted: Sun Dec 14, 2003 9:27 pm    Post subject: Re: Remot-admin (SFTP/SSH) Reply with quote

Tobias_R wrote:
Is there any better way of remote-admin a network than just using SSH / SFTP? Its kind of timeconsuming to download, edit in GUI editor, and uploading again.

Command line tools are part of the systems administrators arsenal, and learning them is IMO part of what the job intails .. there are all the tools, tricks, and what have you, to make remote system administration fairly painless, all that is required is some time to learn them .. believe me it's worth it.

Editing a file remotely is quite simple ..

Code:
vim scp://user@server.tld//path/to/document

This coupled with "i" (insert) .. make changes to file .. ":wq!" (write and quit) should get you through without any knowledge of vim.
_________________
cn=cselkirk,dc=xs4all,dc=nl
Back to top
View user's profile Send private message
Tobias_R
n00b
n00b


Joined: 10 Nov 2003
Posts: 13

PostPosted: Mon Dec 15, 2003 7:13 pm    Post subject: Reply with quote

fidzysss wrote:
Code:
ssh -X user@machine

is what you're looking for: it let you export the display from the remote host to the one initiating the connection. It works in all environnement, you just need a X server.
but the best way, if you just need to edit a few file is to use console editor (nano, vi or emacs) : it consumes far less bandwidth than forwarding X application


Interesting! But I did not get it to work. Can you point me in some direction where to find out more about this nifty feature?

Best regards
Tobias
Back to top
View user's profile Send private message
Tobias_R
n00b
n00b


Joined: 10 Nov 2003
Posts: 13

PostPosted: Mon Dec 15, 2003 7:15 pm    Post subject: Re: Remot-admin (SFTP/SSH) Reply with quote

cselkirk wrote:
Tobias_R wrote:
Is there any better way of remote-admin a network than just using SSH / SFTP? Its kind of timeconsuming to download, edit in GUI editor, and uploading again.

Command line tools are part of the systems administrators arsenal, and learning them is IMO part of what the job intails .. there are all the tools, tricks, and what have you, to make remote system administration fairly painless, all that is required is some time to learn them .. believe me it's worth it.

Editing a file remotely is quite simple ..

Code:
vim scp://user@server.tld//path/to/document

This coupled with "i" (insert) .. make changes to file .. ":wq!" (write and quit) should get you through without any knowledge of vim.


I use CLI tools like nano, jed etc, quite much but after a time it kind of feels like there must be a better way...
Thanx for the "scp" thing! Does this work with other editors as well? (Nano did not work).


Regards
Tobias
Back to top
View user's profile Send private message
fidzysss
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2003
Posts: 109
Location: Paris (France)

PostPosted: Mon Dec 15, 2003 10:26 pm    Post subject: Reply with quote

you must change X11Forwarding to yes in your /etc/ssh/sshd_config on the server
Back to top
View user's profile Send private message
cselkirk
Apprentice
Apprentice


Joined: 09 Jun 2003
Posts: 199
Location: NL

PostPosted: Tue Dec 16, 2003 12:19 am    Post subject: Re: Remot-admin (SFTP/SSH) Reply with quote

Tobias_R wrote:
Thanx for the "scp" thing! Does this work with other editors as well? (Nano did not work).

I imagine not, it's a vim feature (though I haven't tested other editors I imagine there will be problems with the $TERM variable).
_________________
cn=cselkirk,dc=xs4all,dc=nl
Back to top
View user's profile Send private message
Tobias_R
n00b
n00b


Joined: 10 Nov 2003
Posts: 13

PostPosted: Wed Dec 17, 2003 4:13 pm    Post subject: Reply with quote

/home/tobias> ssh -X root@***.***.***.***
root@***.***.***.***'s password:
Warning: No xauth data; using fake authentication data for X11 forwarding.
Last login: Wed Dec 17 18:09:35 2003 from ***************************
[root@ypserver root]


This is what I get. X11 fwrding is enabeld on teh server.


Regards
Tobias
Back to top
View user's profile Send private message
jonnymalm
n00b
n00b


Joined: 26 Jun 2002
Posts: 68

PostPosted: Wed Dec 17, 2003 11:02 pm    Post subject: Reply with quote

I am not sure what platform you are working on remotely but I connect to my home machine(gentoo) from my work machine(windows) using a text editor like ultraedit. It has an option to open from sftp. I then can work on the file locally and then when I hit save it uploads the file.

I am sure there is also a gui text editor that has this option for gentoo.
Does anyone know of one? I am not sure if Kate has this option.
Back to top
View user's profile Send private message
ozonator
Guru
Guru


Joined: 11 Jun 2003
Posts: 591
Location: Ontario, Canada

PostPosted: Thu Dec 18, 2003 3:57 am    Post subject: Reply with quote

Tobias_R wrote:
/home/tobias> ssh -X root@***.***.***.***
root@***.***.***.***'s password:
Warning: No xauth data; using fake authentication data for X11 forwarding.
Last login: Wed Dec 17 18:09:35 2003 from ***************************
[root@ypserver root]


This is what I get. X11 fwrding is enabeld on teh server.


sshd must also be set to allow root to log in remotely (man sshd_config and look for PermitRootLogin to see your options). Depending on how careful you want to be, in most cases it's likely a good idea on a server to prevent root from logging in, or at least to make sure that root can only log in without a password, i.e. using a key pair.

My recommendation for Best Admin Tool (after ssh, of course) would be gnu screen. You get multiple virtual consoles in a single terminal (great for remote access), you can run multiple sessions, and best of all, you can detach from a session and reattach later. You'll soon wonder how you lived without it, especially if you need to interrupt what you're doing or wait for a long compile.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum