Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » [Ubuntu] How to setup SSH?

This thread is locked; no one can reply to it. rss feed Print
 1   2 
[Ubuntu] How to setup SSH?
Specter Phoenix
Member #1,425
July 2001
avatar

I've been trying to set up SSH on my desktop and laptop, but the only sites I'm finding just says to simply do sudo apt-get install openssh-server, edit the config file, restart ssh and you are good to go. Anyone know of a site that tells it better? No site mentioned that it would ask for a password when logging into the other computer and says nothing about finding it out or anything.

Arthur Kalliokoski
Second in Command
February 2005
avatar

You need the password to log onto the other computer just like you were sitting in front of it. If you don't have any accounts on the remote computer you're out of luck, as it should be.

They all watch too much MSNBC... they get ideas.

Specter Phoenix
Member #1,425
July 2001
avatar

Figured that out the first time it asked for a password. The sites I've found though just say to disable the password requirement (which obviously is a dumb idea), but not found anything about setting up the accounts to allow me to connect between the two. Like I said, all the sites I've found only showed to install the server and then how to edit the config file, but nothing about how to set up the accounts. That is why I asked if there was any better site as I've sifted through SSH tutorials and sites all day yesterday and last night.

Arthur Kalliokoski
Second in Command
February 2005
avatar

I have two computers here, and I can ssh back and forth through a patch cable. The firewall on the remote machine (ipconfig stuff) has to allow it (ping the ip), I don't remember having to fiddle with /etc/hosts*, but that may be necessary too. I simply ssh to the other with the ip number (probably the account name too, it's been awhile, in my case "pepsi), and when it asks for a password (the password for the pepsi account on the other machine) I give it. If it wasn't done this way, everybody could hack into everybody else's box like it's done on other OS'es.

They all watch too much MSNBC... they get ideas.

Thomas Fjellstrom
Member #476
June 2000
avatar

Yeah, the accounts are system level accounts. Use whatever username and password you usually use to login.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

MiquelFire
Member #3,110
January 2003
avatar

If I understand what you're asking, then SSH has nothing to do with the question you're asking for.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Specter Phoenix
Member #1,425
July 2001
avatar

Thomas, thanks. See, none of the sites mentioned that, some sites had mentioned making keys and such for it after installing it, but none of them really showed what they were talking about. I've not used ssh before now, and really only messing with it right now out of boredom.

Thomas Fjellstrom
Member #476
June 2000
avatar

It's kind of obvious if you think about it.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Specter Phoenix
Member #1,425
July 2001
avatar

It's kind of obvious if you think about it.

Not really, as the last site I went to after googling just mentioned creating accounts in order to log in to remote computers using ssh. It never covered making the accounts and I couldn't find a site that covered it which is why I asked here. I thought I had to create accounts on each computer for ssh to make it possible to log in, never occurred to me that it would just use the system log ins for that.

[REVISION]
Guess I should have just googled for how to copy files between the two with ssh. This site ( http://principialabs.com/beginning-ssh-on-ubuntu/ ) covered everything. The sites I read just showed the command to install and then went to talk about Public Key Authentication and making accounts to log into. Said to look for AllowUsers and add account names that are able to use ssh, but never covered just using the remote computer's login for it and didn't occur to me due to the fact that is said not to allow root login with ssh either.

Thomas Fjellstrom
Member #476
June 2000
avatar

If it didn't cover how to make the accounts, that implies it likely isn't an SSH feature. Then you can logically deduce that maybe, it would be some other account system that takes care of it. And which account system would make the most sense for ssh to be tied into?

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Trent Gamblin
Member #261
April 2000
avatar

It's not completely obvious. Many vnc servers for example just require a password and log you into whatever account started the server. But yeah, every task on a unix machine is run by some user, so you always need some account to do anything. Well same can be said for Windows, Mac and anything else nowadays. You always need an account.

Specter Phoenix
Member #1,425
July 2001
avatar

If it didn't cover how to make the accounts, that implies it likely isn't an SSH feature. Then you can logically deduce that maybe, it would be some other account system that takes care of it.

No, like I said, most of the sites were geared towards just installing ssh and would just say the commands to install, how to edit the config file, restart ssh. A few just ended there and some would recommend putty and just mention making accounts and public key authentication. Seemed like they were only geared toward installing it and not anything else, so therefore you can't deduce anything from it thanks to how the internet is (I mean look at tutorials on youtube, some are just show you where to download things and how to install them in the first video and save the other details for later videos).

Thomas Fjellstrom
Member #476
June 2000
avatar

I think you just don't know how to think logically :P If it doesn't say how, and you can't think of how, you should immediately search for the solution.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Specter Phoenix
Member #1,425
July 2001
avatar

I did and that is when I started finding things about log in and make a call to ssh-keygen -t dsa that was what I kept finding when I did a google search for "Ubuntu ssh login denied" or something along those parameters. The sites I found said to log in and started going through that, but never explained why the log in was denied. I didn't think I had to use the system login, I thought I would have to make a login that I would have to approve on each ssh config (mainly due to finding the AllowUsers <username> on one site) so I just logically figured the secure part of the ssh was that it made a read only connection between the computers, but couldn't figure out how to make the accounts register because my config file didn't have an AllowUsers option.

Trezker
Member #1,739
December 2001
avatar

My favourite feature on Ubuntu is that you have ssh in nautilus out of the box.
Just point it to your account on another computer and you can use it as if you worked with local folders. sftp://account@ipordomain/home/account

Then you can right click in that folder and start a remote terminal if you need to do command line stuff on that computer.

Specter Phoenix
Member #1,425
July 2001
avatar

I've been fighting that myself right now. I have both the desktop and laptop set to port 5698 and I can connect with ssh and putty, but I can't get any ftp clients to connect to it and scp doesn't seem to work for getting my files off my desktop to my laptop :/. Googling revealed Filezilla and gFTP but both of them say can't resolve host even though I could connect to my desktop with the other methods. Google is offering up tons of solutions, none of which appear to work.

Trent Gamblin
Member #261
April 2000
avatar

Are you trying FTP or SFTP. FTP may not be set up but SFTP works over the same connection as SSH so it would be. Try connecting with a url like this: sftp://<ip> on whatever port ssh is on.

Specter Phoenix
Member #1,425
July 2001
avatar

gFTP has an option to use SSH2, but it was still saying it couldn't resolve host even though I was able to use putty to log into my desktop. I'll keep looking into it though. As for sftp:// it says there is no program installed for that protocol when I type it in.

[REVISION]
Got it working. Apparently, my router is just a p.o.s. and picky as to when it works. My desktop worked fine, but laptop fought it a little.

Tobias Dammers
Member #2,604
August 2002
avatar

Have you tried scp? It's basically the cp command, but over ssh. E.g., to copy an entire directory 'foobar' from host 'baz' to you local machine, you'd say scp -r specter@foobar:baz ./baz. No need to mount anything or go through one of those clumsy file managers ;)

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Specter Phoenix
Member #1,425
July 2001
avatar

Yeah, I said scp didn't work a few posts in. Turned out that I had to instal vsftpd onto my computers to get the FTP to work. Copied all my files and working between the two computers now.

Thomas Fjellstrom
Member #476
June 2000
avatar

As long as ssh works, scp works.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Specter Phoenix
Member #1,425
July 2001
avatar

Apparently not. I was able to ssh to both computers and look at the drives, but when I did scp it said it couldn't find the host on both. After installing vsftpd I was able to use Filezilla to transfer the files, but scp still keeps saying no host found. At least I got filezilla working so I can work between the two. Just copied some projects over to my laptop because I'm going to do a few competitions (well I may just do Moosader's competition that ends Oct 29).

Tobias Dammers
Member #2,604
August 2002
avatar

As long as ssh works, scp works.

That was my impression, too. But then, this is Ubuntu we're talking about here :P

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Thomas Fjellstrom
Member #476
June 2000
avatar

That was my impression, too. But then, this is Ubuntu we're talking about here

We are talking about Specter here ;) I think he just mis-typed the command. scp doesn't use the same command format that ssh does.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Specter Phoenix
Member #1,425
July 2001
avatar

Here is a copy/paste of the command I was using:

scp -r cptvile@192.168.1.103:/Projects /

I just copied and pasted this "scp -r remoteuser@remotebox:/remote/directory local/directory" from http://principialabs.com/beginning-ssh-on-ubuntu and still got no route to host, but could use ssh and putty both to connect with no problem.

 1   2 


Go to: