View previous topic :: View next topic |
Author |
Message |
Tobias_R n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 10 Nov 2003 Posts: 13
|
Posted: Sun Dec 14, 2003 4:59 pm Post subject: Remot-admin (SFTP/SSH) |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
fidzysss Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/PowerPuffs/cartoon_powerpuff_buttercup.gif)
Joined: 16 Feb 2003 Posts: 109 Location: Paris (France)
|
Posted: Sun Dec 14, 2003 5:11 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
cselkirk Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 09 Jun 2003 Posts: 199 Location: NL
|
Posted: Sun Dec 14, 2003 9:27 pm Post subject: Re: Remot-admin (SFTP/SSH) |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Tobias_R n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 10 Nov 2003 Posts: 13
|
Posted: Mon Dec 15, 2003 7:13 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Tobias_R n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 10 Nov 2003 Posts: 13
|
Posted: Mon Dec 15, 2003 7:15 pm Post subject: Re: Remot-admin (SFTP/SSH) |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
fidzysss Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/PowerPuffs/cartoon_powerpuff_buttercup.gif)
Joined: 16 Feb 2003 Posts: 109 Location: Paris (France)
|
Posted: Mon Dec 15, 2003 10:26 pm Post subject: |
|
|
you must change X11Forwarding to yes in your /etc/ssh/sshd_config on the server |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cselkirk Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 09 Jun 2003 Posts: 199 Location: NL
|
Posted: Tue Dec 16, 2003 12:19 am Post subject: Re: Remot-admin (SFTP/SSH) |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Tobias_R n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 10 Nov 2003 Posts: 13
|
Posted: Wed Dec 17, 2003 4:13 pm Post subject: |
|
|
/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 |
|
![](templates/gentoo/images/spacer.gif) |
jonnymalm n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Jun 2002 Posts: 68
|
Posted: Wed Dec 17, 2003 11:02 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
ozonator Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/16477578393f7edb08225c3.png)
Joined: 11 Jun 2003 Posts: 591 Location: Ontario, Canada
|
Posted: Thu Dec 18, 2003 3:57 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|