How does one use SSH?

prime

Walking No-Fun Ball
Hello,

I would like to learn how to use SSH to login to a separate computer. I've figured out how to create a passphrase using ssh-keygen (using the RSA1 format), but beyond that I'm stumped. Please help me get this working!

Chris
 
well i don t know anything about using a passphrase. i m sure someone else will tell you, but it s basically this:
Code:
% ssh [I]username[/I]@[I]hostname[/I]

that allows you remote access to your machine. it will prompt you for the password you created when you created your account
 
i haven't used ssh for a while, but i believe that:

ssh -l username domain

will do the trick. you should be prompted for a password, then it works like telnet.
 
man ssh

Should get you all the info you need.

I use it like aber421 mentioned (note that it is a dash ell, not dash one to specify username). But all you really need is ssh hostname and it will prompt you for a user name and password.

I've never generated any keys for ssh. I just ssh into the host, and ssh asks me if I want to generate a fingerprint key or something. Say yes and it goes.
 
I tried to do that, but every time I try it prints "Connection Refused." I assume that username@hostname is basically their email address? So, for someone to connect to me, it would be cfournier@bendcable.com. Right?
 
Assuming that the remote host is bendcable.com, and you can log in with cfournier, that should be right.

It is entirely possible that the host (bendcable in this case) does not have ssh enabled. Try using telnet to get in -- it's not secure, but most places will have this working if shell access is enabled at all. Telnet syntax is telnet hostname.

If this doesn't work, contact your remote host admin. Most likely an email to support@bendcable.com should do the trick. They may not enable any shell access for their users at all, in which case you're out of luck.
 
Originally posted by prime
I tried to do that, but every time I try it prints "Connection Refused." I assume that username@hostname is basically their email address? So, for someone to connect to me, it would be cfournier@bendcable.com. Right?

It has to be the hostname or ip address of the remote computer, not the MX record.

email address is not the same as host address.

Thomas
 
Oh contrariness, Scummer.

It really depends on how the host is set up. For example, way back in the ol' college days I had an email account username@blah.blah.blah.edu. My login was username and the hostname was blah.blah.blah.edu. So I was able to ssh username@blah.blah.blah.edu right in.

Not that I think all setups are like that, but they can be. :cool:
 
Do you mean that you want to SSH in to your local machine?

If so, in 10.1 and above, go to the System Preferences' Sharing pane, Application tab, and check "Allow remote login". This opens and configures SSH (i.e., not telnet) by default.

SSH in using one of the applications below; their iterfaces are fairly intutitive.

I do this all the time, that is, SSH in from work, school, or someone else's house. I use PuTTY (freakin' tiny single-file exe for the windoze machines) and NiftyTelnet for the others. I stuck both files in my web server folder so i can DL them wherever i am. Very useful!
 
Originally posted by nkuvu
Assuming that the remote host is bendcable.com, and you can log in with cfournier, that should be right.

It is entirely possible that the host (bendcable in this case) does not have ssh enabled. Try using telnet to get in -- it's not secure, but most places will have this working if shell access is enabled at all. Telnet syntax is telnet hostname.

If this doesn't work, contact your remote host admin. Most likely an email to support@bendcable.com should do the trick. They may not enable any shell access for their users at all, in which case you're out of luck.

The best way to is to telnet to the port at the hostname. In this case,

telnet bendcable.com 22

I tried to ports 22 (ssh), then 23 (telnet), then 21 (ftp). 22 and 23 are closed. What I learned from 21 is that this is a Windows server. There are ssh servers for Windows, but most likely this is not part of this server unless intentionally installed by someone.
 
Well, I figured out how to connect. Since BendCable.com doesn't work, I just tried to use direct connect to the computer using its IP address, and it works great.
 
Originally posted by nkuvu
Oh contrariness, Scummer.

It really depends on how the host is set up. For example, way back in the ol' college days I had an email account username@blah.blah.blah.edu. My login was username and the hostname was blah.blah.blah.edu. So I was able to ssh username@blah.blah.blah.edu right in.

Not that I think all setups are like that, but they can be. :cool:

Most companies today set up their domain name to resolve to the IP of their webserver. Bendcable did not as i just tested... but it should be some computer in their company network that is not reserved for users.

If he wants to find out, what his hostname is, he should just open a terminal and type in 'ifconfig -a' and take the IP which is assigned to the network card and then type in 'host "assigned IP"'

Now with the hostname or ip address you can connect from any other computer to your own machine.

Thomas

PS : The naming of the bendcable hostnames are as follows:

bash-2.05a$ host -l bendcable.com
bendcable.com has address 216.228.188.11
bendcable.com name server tumalo.bendcable.net
bendcable.com name server sisters.bendcable.net
12101.bendcable.com has address 192.168.12.101
12145.bendcable.com has address 192.168.12.145
12146.bendcable.com has address 192.168.12.146
abc.bendcable.com has address 208.139.26.244
admiral.bendcable.com has address 216.228.188.11
adv1811.bendcable.com has address 10.20.18.11
air1820.bendcable.com has address 10.20.18.20
amr1645.bendcable.com has address 10.10.16.45
as5300.bendcable.com has address 216.228.160.20
back2948g.bendcable.com has address 192.168.18.3
back2948gnew.bendcable.com has address 192.168.18.23
bc1001.bendcable.com has address 66.220.100.1
bc10010.bendcable.com has address 66.220.100.10
bc100100.bendcable.com has address 66.220.100.100
bc100101.bendcable.com has address 66.220.100.101
bc100102.bendcable.com has address 66.220.100.102

etc etc etc etc

Thomas
 
Back
Top