Welcome to WebmasterWorld Guest from 3.234.210.89

Forum Moderators: bakedjake

Message Too Old, No Replies

Just discovered the joys of SSH

I'm impressed.

     
1:40 am on Sep 18, 2003 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 15, 2001
posts:7848
votes: 96


Up until now I have had to move around the house to carry out different tasks on my computers.

No longer.... I installed "putty" and can how control them all from SSH.

I have to admit I have been very slow to try out something that should have been obvious from the start but to be honest I had no idea how to set it up or use it.

Now I can simply type shell commands in via one computer and have them sent to any box on the lan. It also means that I can finaly get all my computers into a walk in cupboard and forget about monitors ect.

Now I am looking for tips on using ssh effectivly. for example is is possible to open and modify a file using ssh or do I really need direct access to do this.

Any tips tricks greatfuly received :)

Mack.

3:01 am on Sept 18, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Mar 14, 2002
posts:325
votes: 0


is possible to open and modify a file using ssh

As for editing a page remotely? As long as the user logged in has permissions over the file (just like local), no problem.

3:07 am on Sept 18, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Dec 9, 2002
posts:325
votes: 0


Tips 'n tricks -
Definately make use of the saved session feature of Putty. For every server I manage, I have a session saved with preferences set.
For instance, I set it up so that my colours stand out (the dark blue that is used on Red Hat Linux ls listings is far too dark on the black background). Change that to something a lot lighter.
Change the scrollback buffer to 999 lines
Set preferences for SSH2, with compression.

As for file editing; yep, no problem!
Just log in there and then vi (substitute your favourite editor) the file and you're away.

JP

3:11 am on Sept 18, 2003 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 15, 2001
posts:7848
votes: 96


Thanks,
Ok the machine I am on just now is a windows PC. What command can I issue to open the files to be edited, and how do I save etc? (pardon the ssh newbie nere) :)

Thanks guys, gona go play around :)

Mack.

4:19 am on Sept 18, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 18, 2003
posts:1929
votes: 0


$ vi /path/to/filename

... make changes ...

Press ESC
then type :wq - write, quit
or you can just save - :w
or just quit without saving - :q!

there are many other options, but this are the most useful. You can find a full list in man vi

4:37 am on Sept 18, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:July 27, 2000
posts:426
votes: 0


you can use SSH to access other windows machines? I've only used it on a Windows machine to access a box running linux.
12:07 pm on Sept 18, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 26, 2003
posts:50
votes: 0


vi takes a little time to get used to (but is well worth the effort). You might also consider using pico (part of the pine package) if you only want to make basic edits, it's more beginner friendly.
12:18 pm on Sept 18, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 12, 2002
posts:43
votes: 0


Putty is great. SSH Tunnels are also great :)

Example: your evil boss installs filtering software which prevents you from getting to site XYZ. Run a http proxy (like squid) on your remote machine. Setup putty to forward the http proxy port (8080) via SSH Tunnel. Set up your browser to use your proxy on loopback 127.0.0.1:8080. Now when you web browse the requests are sent through your SSH tunnel to your OWN web proxy and you can get to anything you can get to at home. Now you an get to your websites and your evil boss can't really spy on your web activity (well, unless he happens to walk by and notices you're posting to Webmaster World again when you *should* be working).

Also.. IMPORTANT everyone out there: PATCH your machines if you're running OpenSSH. See: [openbsd.org...] There was a patch released on 9.16.03 then another released on 9.17.03. Make sure your systems are up to date.

8:45 pm on Sept 18, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 8, 2002
posts:65
votes: 0


pageant

Can set up keys on each machine, so when you connect, you don't have to enter a password.

There's also a script written by Anthony Robbins to do the same thing for bash... I forget what it's called...

1:39 am on Sept 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 12, 2003
posts:772
votes: 0



roscoepico:

vandyke technologies, look for securecrt and the matching
ssl server.

since you can tunnel, you can also use terminal services
over the tunnel.

+++++

3:02 pm on Sept 19, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 3, 2002
posts:482
votes: 0


I'd also recommend SecureCRT over putty, although it's a commercial app.

For editing files on a *nix box mcedit (from mc - Midnight Commander) is a nice one for newbies. It's a Norton Commander clone... if you happen to be one of those old DOS guys.

And if you can't use even that you can always scp the file to your box, edit it there, and scp it back.

3:08 pm on Sept 19, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Feb 5, 2002
posts:333
votes: 0


have you thought about using vnc? with vnc you can have multiple desktops on one machine.

i've used both putty and securecrt and prefer putty because it gives me what i want and it's free.

5:39 pm on Sept 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 12, 2002
posts:885
votes: 0


VNC + ssh tunnels is great!

I don't know Putty all that well, since my employer has the SSH Communications Corporation client on all the Windows machines and I don't run Windoze on any of my own boxen. However, there's a decent chance it honors the same command line options as the OpenSSH *nix client. I do:

workuser@workbox:~$ ssh -l homeuser -L 5900:home.box:5901 home.box
homeuser@home:~$ vncserver

Then launch vncviewer on the work machine, pointed at localhost:0. Full graphical desktop from the remote machine, in a window on the one you're sitting at. All the data goes over the encrypted SSH link, and I have access to all my favorite *nix apps on my home machine. It's suprising how often I actually use this to get work done with better tools I have at home.

2:45 pm on Sept 22, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 12, 2002
posts:43
votes: 0


I just thought of another cool ssh tool: "mindterm". It's a free java based SSH client.

Install it on your webserver and then you don't need to download a client to the machine you're using (assuming that it has java support). I've found this handy when accessing my computer from things such as free airport internet access kiosks. :)