homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam

The Geek Culture Forums


Post New Topic  New Poll  Post A Reply
my profile | directory login | | search | faq | forum home
  next oldest topic   next newest topic
» The Geek Culture Forums   » Other Geeky Stuff   » Ask a Geek!   » SSH and Terminal (Page 1)

 - UBBFriend: Email this page to someone!  
This topic comprises 2 pages: 1  2 
 
Author Topic: SSH and Terminal
Rhonwyyn

Solid Gold SuperFan!
Member # 2854

Member Rated:
4
Icon 1 posted December 20, 2005 15:27      Profile for Rhonwyyn   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Okay, so I've heard people talk about SSH a lot. Now that it's December, I have a lot of time to practice. In particular, I'd like to be able to log onto IRC channels. I'm assuming it starts with Terminal.

When I start Terminal, this appears in my window:
code:
 first1-last1:~ my.name$ 

What do I do next?

--------------------
Change the way you SEE, not the way you LOOK!

Posts: 3849 | From: Lancaster, PA | Registered: Jul 2004  |  IP: Logged
MacManKrisK

Gold Hearted SuperFan!
Member # 955

Member Rated:
5
Icon 1 posted December 20, 2005 15:46      Profile for MacManKrisK     Send New Private Message       Edit/Delete Post   Reply With Quote 
SSH and Terminal have nothing to do with IRC. Here is all you need to know...

http://www.geekculture.com/geekycomics/Aftery2k/fanclub/irc.html

And this....

http://gc.stonewallcs.com/IRC/

--------------------
"Buy low, sell high
get rich and you still die"


Posts: 2331 | From: Southwest Michigan, USA | Registered: Oct 2001  |  IP: Logged
Rhonwyyn

Solid Gold SuperFan!
Member # 2854

Member Rated:
4
Icon 1 posted December 20, 2005 15:54      Profile for Rhonwyyn   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
but see, Kris, I can't get onto IRC at work, but I've heard people say they've been able to use SSH to get around port blocks. I know of at least two websites with built-in IRC, but my connection's always denied. I was under the impression that SSH would help me get around that.

Further research would show that it's not SSH I want. It's some other command-line stuff. I used to know how to access a Web page in CMD on a PC, but that was years ago. Can something similar be done using Terminal? (And what purpose does Console in OSX serve?

--------------------
Change the way you SEE, not the way you LOOK!

Posts: 3849 | From: Lancaster, PA | Registered: Jul 2004  |  IP: Logged
Callipygous
BlabberMouth, a Blabber Odyssey
Member # 2071

Member Rated:
4
Icon 1 posted December 20, 2005 16:23      Profile for Callipygous     Send New Private Message       Edit/Delete Post   Reply With Quote 
Console is for reading logs, which are only exciting to hard core geeks! If you want to dip your toe into the Terminal and the vital and exciting world of unix, I suggest that maybe reading the relevant section in David Pogue's "OSX The Missing Manual" may not be a bad place to start. He explains things clearly in a witty and approachable style. I believe there are some tutorials up on the O'Reilly web site too if I remember correctly.

There are quite a few things that can only be accomplished using the Terminal, but personally I don't believe one should be masochistic about it. Only use it when you have to, unless you have a silicon obsessive streak, as to get really comfortable with it takes a great deal of time than I would prefer to devote to drink and loose women. (chance would be a fine thing!)

--------------------
"Knowledge is Power. France is Bacon" - Milton

Posts: 2922 | From: Brighton - UK | Registered: Mar 2003  |  IP: Logged
csk

Member # 1941

Member Rated:
5
Icon 1 posted December 20, 2005 16:24      Profile for csk     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by Rhonwyyn:
but see, Kris, I can't get onto IRC at work, but I've heard people say they've been able to use SSH to get around port blocks.

The way I've done it in the past is have a machine running a ssh server always connected at home, and to ssh into that machine and then command line IRC from there. I guess there are other ways, but I would think that approach is the most common...

--------------------
6 weeks to go!

Posts: 4455 | From: Sydney, Australia | Registered: Jan 2003  |  IP: Logged
Rhonwyyn

Solid Gold SuperFan!
Member # 2854

Member Rated:
4
Icon 1 posted December 20, 2005 16:26      Profile for Rhonwyyn   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Okay, that makes much more sense. Thanks, csk! [hearts]

--------------------
Change the way you SEE, not the way you LOOK!

Posts: 3849 | From: Lancaster, PA | Registered: Jul 2004  |  IP: Logged
alfrin
Uber Geek
Member # 3836

Member Rated:
4
Icon 1 posted December 20, 2005 16:29      Profile for alfrin     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by csk:
quote:
Originally posted by Rhonwyyn:
but see, Kris, I can't get onto IRC at work, but I've heard people say they've been able to use SSH to get around port blocks.

The way I've done it in the past is have a machine running a ssh server always connected at home, and to ssh into that machine and then command line IRC from there. I guess there are other ways, but I would think that approach is the most common...
Same here. I also run vncserver every morning before I leave so I can use my other programs inside of it. That way I don't get nagged by the teacher/boss (I intern on vacations) about installing stuff. Plus I just love my FVWM so much.

--------------------
Art is Resistance / Resistance is Art

Posts: 813 | From: Nevada, USA | Registered: Apr 2005  |  IP: Logged
maximile

SuperFan!
Member # 3446

Member Rated:
5
Icon 1 posted December 21, 2005 03:58      Profile for maximile   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
There's always the Java interface, for a less fun (but easier) way to connect from work.

Or is that what you meant by "websites with built-in IRC"?

Posts: 1085 | From: London, UK (Powys, UK in hols) | Registered: Feb 2005  |  IP: Logged
Metasquares
Highlie
Member # 4441

Member Rated:
5
Icon 1 posted December 21, 2005 05:17      Profile for Metasquares   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
You can connect to IRC with terminal (telnet open server 6667), but you'd need to know the IRC protocol to do this.

You can set up an SSH tunnel that will map to certain ports on the remote end, but that depends on your SSH client and server. If you're in Windows, PuTTY will do that for you. You can also just ssh into your home machine (I do the same thing that csk does) and use a command-line IRC client from there.

Posts: 664 | From: Morganville, NJ | Registered: Oct 2005  |  IP: Logged
quantumfluff
BlabberMouth, a Blabber Odyssey
Member # 450

Member Rated:
5
Icon 1 posted December 21, 2005 06:24      Profile for quantumfluff     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
...Further research would show that it's not SSH I want. It's some other command-line stuff. I used to know how to access a Web page in CMD on a PC, but that was years ago. Can something similar be done using Terminal?
Yes.
quote:

telnet www.geekculture.com 80
Trying 217.160.251.38...
Connected to www.geekculture.com.
Escape character is '^]'
GET / HTTP/1.0
<second newline>
... page spews back

Or, you can use one of the many command line tools to get the pages for you. wget comes with many linuxes. I prefer webfetch for better browser spoofing. I have written a lot of web-scrapers with it.
Posts: 2902 | From: 5 to 15 meters above sea level | Registered: Jun 2000  |  IP: Logged
drunkennewfiemidget
BlabberMouth, a Blabber Odyssey
Member # 2814

Member Rated:
4
Icon 1 posted December 21, 2005 06:32      Profile for drunkennewfiemidget     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by quantumfluff:
[QB]
telnet www.geekculture.com 80
Trying 217.160.251.38...
Connected to www.geekculture.com.
Escape character is '^]'
GET / HTTP/1.0
<second newline>
... page spews back

If there's more than one virtual hosted site on that IP address, you need the Host header.

code:
GET / HTTP/1.1
Host: www.geekculture.com

Anyway, Rhon, let me try and explain this for ya.

SSH is a program that essentially lets you log into another computer somewhere on the internet (or any network, really).

When you run a terminal, if you successfully ssh somewhere else, you'll be *essentially* running a terminal on *THAT* computer, at which time, THAT firewall's outgoing firewall rules will decide where you can and cannot go, not your local computer's. But only in that session, it won't control your browser or anything else.

If you get an account on a system somewhere and you want to IRC from it, ssh to it by typing:

ssh [email protected]

Enter your password.

Then try a program that will connect to irc. Common programs many systems have for irc access are irssi, and bitchx.

Posts: 4897 | From: Cambridge, ON, Canada | Registered: Jun 2004  |  IP: Logged
Callipygous
BlabberMouth, a Blabber Odyssey
Member # 2071

Member Rated:
4
Icon 1 posted December 21, 2005 16:29      Profile for Callipygous     Send New Private Message       Edit/Delete Post   Reply With Quote 
Though dnm's explanation is correct and admirably clear, I would add that setting up 2 computers so one can ssh into the other is not completely straightforward for the uninitiated, particularly if you have a firewalls or NAT to get through, though of course like all these things, after doing it once it all makes sense. A tip worth knowing is that in the OSX Terminal on a local network you can use the Bonjour name of your computer (e.g. mycomputer.local), wherever you would otherwise have to use an IP address, which makes it a bit simpler.

However I am still not sure whether all this is overkill, if your chief motive is to just get IRC working. A quiet word with whoever administers the firewall might be a better answer.

--------------------
"Knowledge is Power. France is Bacon" - Milton

Posts: 2922 | From: Brighton - UK | Registered: Mar 2003  |  IP: Logged
alfrin
Uber Geek
Member # 3836

Member Rated:
4
Icon 1 posted December 21, 2005 19:17      Profile for alfrin     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by Callipygous:


However I am still not sure whether all this is overkill, if your chief motive is to just get IRC working. A quiet word with whoever administers the firewall might be a better answer.

Unfortunatly such services are banned and blocked because of loss of productivity, so administrators are told by "the high and mighty" to destroy all access to such protocols, they arn't about to risk their jobs for one person.
With SSH, it isn't normally blocked, because of it's relative importance. I myself get so much work done SSH and VNCing into my home box, plus I don't have to use the accursed Windows XP and can live happily in my Gentoo box.

--------------------
Art is Resistance / Resistance is Art

Posts: 813 | From: Nevada, USA | Registered: Apr 2005  |  IP: Logged
nerdwithnofriends
Uber Geek
Member # 3773

Icon 1 posted December 21, 2005 20:31      Profile for nerdwithnofriends     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by alfrin:
quote:
Originally posted by Callipygous:


However I am still not sure whether all this is overkill, if your chief motive is to just get IRC working. A quiet word with whoever administers the firewall might be a better answer.

Unfortunatly such services are banned and blocked because of loss of productivity, so administrators are told by "the high and mighty" to destroy all access to such protocols, they arn't about to risk their jobs for one person.
With SSH, it isn't normally blocked, because of it's relative importance. I myself get so much work done SSH and VNCing into my home box, plus I don't have to use the accursed Windows XP and can live happily in my Gentoo box.

And if all else fails, one can just run sshd on port 80 and not have a problem.

--------------------
"The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower." - Robert M. Pirsig

Posts: 948 | Registered: Mar 2005  |  IP: Logged
GameMaster
BlabberMouth, a Blabber Odyssey
Member # 1173

Member Rated:
4
Icon 1 posted December 21, 2005 20:57      Profile for GameMaster   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by alfrin:
Unfortunatly such services are banned and blocked because of loss of productivity, so administrators are told by "the high and mighty" to destroy all access to such protocols, they arn't about to risk their jobs for one person.
With SSH, it isn't normally blocked, because of it's relative importance. I myself get so much work done SSH and VNCing into my home box, plus I don't have to use the accursed Windows XP and can live happily in my Gentoo box.

VNC isn't very secure... The real answer I've found:
Client side (the office computer -- if your allowed to install FOSS software): install cygwin with:
- the xorg packages,
- net packages
- ssh (older versions this is under shells packages)

On your "server" (Unix, BSD, Linux, or Solaris) start sshd (apt-get, yum, port, emerge, etc. if needed). On your router or firewall (if you have one) set it to forward port 22 (ssh) requests to the machine that is your "server". Make sure that sshd.config doesn't let root login remotely, and that you keep sshd and ssl up to date on the server.

From the client machine, inside cygwin, type:

startx

#(a new xterm window will open - switch to it and type)

ssh -X [email protected] # (where user is the username, server is the IPaddress or domain name)

The first time it will show a key, and ask if you wish to acept this, it may be wise to check the key to see if it ideed matches the "servers" ssh key, but in likely hood it will -- type "yes" to the question (and I do mean "yes" not just a "y". you will then be prompted for a user's password, enter it. If all is right with the world, you will be at a command line on the "server," and able to run XWindows programs from the remote machine. The obvious benifit to this over VNC is that everything is encrypted and not sent as raw text/data...

If your paranoid (and I am) to make it a bit more secure, you could setup IPTables on the server to only allow connections from computers (IP Addresses or MAC address) that you know you will use. In addition -- tripwire and/or other security programs should be installed, all unused ports blocked at the router and IPTables. Remember to check logwatch and the files in /var/log regularly. And remember the password rules of the week.

That's pretty good... If I were a bit more worried, or it had to be super secure -- I'd also push for adding kerberose authentication (from a third (trusted) party) in addition to a simple Unix loggin password.

--------------------
My Site

Posts: 3038 | From: State of insanity | Registered: Mar 2002  |  IP: Logged
csk

Member # 1941

Member Rated:
5
Icon 1 posted December 21, 2005 21:56      Profile for csk     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by GameMaster:
VNC isn't very secure...

True, but over some sort of VPN/ssh tunnel or similar it works well.

--------------------
6 weeks to go!

Posts: 4455 | From: Sydney, Australia | Registered: Jan 2003  |  IP: Logged
GameMaster
BlabberMouth, a Blabber Odyssey
Member # 1173

Member Rated:
4
Icon 1 posted December 22, 2005 05:02      Profile for GameMaster   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
If your SSH tunneling, why on earth bother with VNC? Why not just use X-forwarding?
Posts: 3038 | From: State of insanity | Registered: Mar 2002  |  IP: Logged
MacManKrisK

Gold Hearted SuperFan!
Member # 955

Member Rated:
5
Icon 1 posted December 22, 2005 09:58      Profile for MacManKrisK     Send New Private Message       Edit/Delete Post   Reply With Quote 
Rohn: IIRC you have a Pismo at home running OS X... this will all work just fine if you don't try to do something complicated like using X-window and VNC and all that and just use a command-line IRC client. The hardest part will be getting the command-line client on your mac, but here is my estimation of how to do it...

pre-setup (on your Mac at home):
1) install Fink via the instructions on their website (you could also install Portage for MacOS or other things, but I think Fink is the simplest one)

2) use fink to install BitchX or irssi (or both, and play around with them to see which one you like better!)

3) go into Termainal and make sure your IRC client of choice works and that you have a decent feel for how to use it!

4) Go into System Preferences, then into the "Sharing" preferences pane. Under the "Services" tab, put a check mark by "Remote Login." In a few seconds you should see a message at the bottom of the window that says "To log in to this computer remotely..." There will be an IP address there, make sure it does NOT start with 192 or 10... if it does, then we have more fish to fry... if it does not, then write the address down on a piece of paper. Close System Preferences.

At work (once you've set up all this stuff at home) (I'm assuming you're using some flavour of Winblows at work):

1) download PuTTY

2) Run PuTTY and set up a new connection to connect to the IP address you wrote down, using the SSH protocol (this should be fairly straightforward in PuTTY), use your "short username" from your Pismo as your login and your standard login password (again, from your Pismo) as your password.

3) You should now be logged into your Pismo at home, you'll get a screen with "Welcome to Darwin" and the same prompt you get from "Terminal" at home. Now just run irssi or BitchX as you normally would from the Terminal at home.

[Big Grin]

BTW: if your IP from step 4 above starts with 192 or 10, then you're behind a firewall at home and we'll need to figure out how to configure your firewall to allow port 22 (SSH) to get through and some other stuff... but I'd doubt that would be the case unless you specifically have a firewall...

--------------------
"Buy low, sell high
get rich and you still die"


Posts: 2331 | From: Southwest Michigan, USA | Registered: Oct 2001  |  IP: Logged
Rhonwyyn

Solid Gold SuperFan!
Member # 2854

Member Rated:
4
Icon 1 posted December 22, 2005 11:50      Profile for Rhonwyyn   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Thanks for the help, everyone. The more you say, the more I realize this won't be happening anytime soon because:

a) I use OS X at work
b) I can't install programs at work
c) I don't have always-on broadband yet.

Once c) is remedied, I'll try communicating between my Pismo and Mom's Sony Vaio tower. [Smile]

(And yes, surgery's over and went well. I'm actually typing with two hands... practicing fine motor skills and all that. [Wink] )

Posts: 3849 | From: Lancaster, PA | Registered: Jul 2004  |  IP: Logged
MacManKrisK

Gold Hearted SuperFan!
Member # 955

Member Rated:
5
Icon 1 posted December 22, 2005 12:57      Profile for MacManKrisK     Send New Private Message       Edit/Delete Post   Reply With Quote 
You have OSX at work?! Great, then you don't need to install anything, just open Terminal and type "ssh [email protected]"

anyway..... good to hear about your hand [Smile]

--------------------
"Buy low, sell high
get rich and you still die"


Posts: 2331 | From: Southwest Michigan, USA | Registered: Oct 2001  |  IP: Logged
dragonman97

SuperFan!
Member # 780

Member Rated:
4
Icon 1 posted December 22, 2005 14:21      Profile for dragonman97   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Hint...hint....it sounds like it would be ill-advised to check out any of this stuff from work, given the corporate Internet policy you showed us. From their point of view, they are paying you to just get a job done, and don't want any frivolty done with their computers. And I hate to say it, but they are pretty much within their rights to say that. Ergo, it might be rather unwise to oppose them.

--------------------
There are three things you can be sure of in life: Death, taxes, and reading about fake illnesses online...

Posts: 9332 | From: Westchester County, New York | Registered: May 2001  |  IP: Logged
alfrin
Uber Geek
Member # 3836

Member Rated:
4
Icon 1 posted December 22, 2005 22:04      Profile for alfrin     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by GameMaster:
If your SSH tunneling, why on earth bother with VNC? Why not just use X-forwarding?

Because I've never, honestly, gotten that working :\

--------------------
Art is Resistance / Resistance is Art

Posts: 813 | From: Nevada, USA | Registered: Apr 2005  |  IP: Logged
nerdwithnofriends
Uber Geek
Member # 3773

Icon 1 posted December 23, 2005 00:02      Profile for nerdwithnofriends     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by alfrin:
quote:
Originally posted by GameMaster:
If your SSH tunneling, why on earth bother with VNC? Why not just use X-forwarding?

Because I've never, honestly, gotten that working :\
Really? It's fairly straight-forward on an OS X client machine, assuming you have X11 installled. ssh -x [email protected] or something like that.

--------------------
"The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower." - Robert M. Pirsig

Posts: 948 | Registered: Mar 2005  |  IP: Logged
drunkennewfiemidget
BlabberMouth, a Blabber Odyssey
Member # 2814

Member Rated:
4
Icon 1 posted December 23, 2005 06:46      Profile for drunkennewfiemidget     Send New Private Message       Edit/Delete Post   Reply With Quote 
CAPITAL X if it's OpenSSH (which I assume OS X is).

Lowercase x means explicitly deny X forwarding.

Posts: 4897 | From: Cambridge, ON, Canada | Registered: Jun 2004  |  IP: Logged
alfrin
Uber Geek
Member # 3836

Member Rated:
4
Icon 1 posted December 23, 2005 07:51      Profile for alfrin     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by nerdwithnofriends:
quote:
Originally posted by alfrin:
quote:
Originally posted by GameMaster:
If your SSH tunneling, why on earth bother with VNC? Why not just use X-forwarding?

Because I've never, honestly, gotten that working :\
Really? It's fairly straight-forward on an OS X client machine, assuming you have X11 installled. ssh -x [email protected] or something like that.
Well I'm not using an OSX machine, not to mention I don't have X installed on my new install of windows yet, I'll have to at some point I guess.

--------------------
Art is Resistance / Resistance is Art

Posts: 813 | From: Nevada, USA | Registered: Apr 2005  |  IP: Logged


All times are Eastern Time
This topic comprises 2 pages: 1  2 
 
Post New Topic  New Poll  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | Geek Culture Home Page

2015 Geek Culture

Powered by Infopop Corporation
UBB.classicTM 6.4.0



homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam