You are not logged in.
Hello. Having nothing to do today, I decided to set up a server on my home computer (arch-powered, of course). I realised that openssh-server does not exist in the official repositories or in the AUR. I looked at the wiki article on openssh, but it does not tell me how to create one, just how to join one, which is not what I'm trying to do... Can anyone help?
Last edited by ijiboom (2012-06-12 14:53:38)
"Flying is learning how to throw yourself at the ground and miss." Douglas Adams, Life, the universe and everything
Offline
Read the openssh wiki page and look for anything related to the daemon. That is the server. Openssh does both.
Offline
As defears pointed out, sshd is part of openssh. There is no separate package.
All you have to do is to tweak the `/etc/ssh/sshd_config` (not even necessary to just get started).
And start the daemon using rc.d start sshd
For more info see
man sshd
man sshd_config
Offline
Yeah, you were right defears... Now the problem is, I've created the server and am running the daemon on startup. I'm trying to connect to it from my Android phone with this app called ConnectBot, and it tells me the "host has disconnected"...
Last edited by ijiboom (2012-06-12 14:56:11)
"Flying is learning how to throw yourself at the ground and miss." Douglas Adams, Life, the universe and everything
Offline
Might be worth going through the openssh wiki article.
Aside from that, check if you can ssh locally (aka run "ssh -v localhost" from your archbox). If that works, your ssh daemon is functioning correctly; if not, read the wiki article because something's most likely wrong with your setup.
Burninate!
Offline
Try to ssh into your home computer from your home computer and see if it connects.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
tu fukawi, I have read that part many times already, it didn't help. As for Gcool, I've tried that already, it says the connection was refused. I've reinstalled openssh many times already, nothing seems to work.
Thanks anyway
"Flying is learning how to throw yourself at the ground and miss." Douglas Adams, Life, the universe and everything
Offline
Is your phone using wifi or 3g/4g? Are you trying with hostnames or ip addresses?
Offline
Are you absolutely sure that sshd is running? What's the output of:
netstat -an | grep 22
Also, paste the output of
ssh -v localhost
as both Gcool and nomorewindows have suggested. Further, the output of:
ps aux | grep ssh
might be useful as well. You may want to look at /var/log/auth.log.
It's difficult to offer any suggestions without seeing a bit more about your particular circumstance, so be sure to copy and paste the appropriate lines (preferably in code tags).
He who has no .plan has small finger.
~Confucius on UNIX.
Offline
Make sure you are using the correct IP address (ie your public IP address not your internal one), and make sure that you have the relevant ports open on your router/firewall.
Offline
Make sure you are using the correct IP address (ie your public IP address not your internal one), and make sure that you have the relevant ports open on your router/firewall.
This is pretty irrelevant if connecting locally isn't even functioning.
Burninate!
Offline
b4data wrote:Make sure you are using the correct IP address (ie your public IP address not your internal one), and make sure that you have the relevant ports open on your router/firewall.
This is pretty irrelevant if connecting locally isn't even functioning.
My bad, I missed the part where OP confirmed that, sorry.
Offline
Allright so:
netstat -an | grep 22
output :
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.35:57269 173.194.70.125:5222 ESTABLISHED
tcp 0 0 192.168.1.35:58220 173.194.35.47:443 ESTABLISHED
tcp 1 1 192.168.1.35:48787 80.247.227.201:80 LAST_ACK
tcp6 0 0 :::22 :::* LISTEN
unix 3 [ ] STREAM CONNECTED 22354 @/tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 12218
unix 3 [ ] STREAM CONNECTED 12217
unix 3 [ ] STREAM CONNECTED 9622
unix 3 [ ] SEQPACKET CONNECTED 13522
unix 3 [ ] STREAM CONNECTED 11522 @/tmp/dbus-5HDDwBxI78
unix 3 [ ] STREAM CONNECTED 13229
unix 2 [ ] DGRAM 13222
unix 2 [ ] STREAM 13022
"Flying is learning how to throw yourself at the ground and miss." Douglas Adams, Life, the universe and everything
Offline
Then,
ssh -v localhost
output:
OpenSSH_6.0p1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug1: identity file /home/iraj/.ssh/id_rsa type -1
debug1: identity file /home/iraj/.ssh/id_rsa-cert type -1
debug1: identity file /home/iraj/.ssh/id_dsa type -1
debug1: identity file /home/iraj/.ssh/id_dsa-cert type -1
debug1: identity file /home/iraj/.ssh/id_ecdsa type -1
debug1: identity file /home/iraj/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0
debug1: match: OpenSSH_6.0 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA eb:2e:98:1a:cf:19:45:49:7b:30:40:7a:70:9e:45:50
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is eb:2e:98:1a:cf:19:45:49:7b:30:40:7a:70:9e:45:50.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/iraj/.ssh/id_rsa
debug1: Trying private key: /home/iraj/.ssh/id_dsa
debug1: Trying private key: /home/iraj/.ssh/id_ecdsa
debug1: Next authentication method: password
iraj@localhost's password:
Connection closed by UNKNOWN
Last edited by ijiboom (2012-06-16 12:30:31)
"Flying is learning how to throw yourself at the ground and miss." Douglas Adams, Life, the universe and everything
Offline
finally,
ps aux | grep ssh
output:
root 441 0.0 0.0 41984 1284 ? Ss 16:20 0:00 /usr/sbin/sshd
iraj 1775 0.0 0.0 8656 1052 pts/0 S+ 16:30 0:00 grep ssh
"Flying is learning how to throw yourself at the ground and miss." Douglas Adams, Life, the universe and everything
Offline
As for how I'm connecting from my phone, I've tried my local IP address, my public one, from 3G, wifi, everything. It always gives the same output...
"Flying is learning how to throw yourself at the ground and miss." Douglas Adams, Life, the universe and everything
Offline
When I see your last output I wonder what the result of that localhost connection attempt was and which part of your problem persists.
edit: We crossposted; I was referring to the ssh -v localhost output. Given your last post I assume the localhost connection worked then, but you still cannot connect from remote. Keep in mind the "host has disconnected" can also mean your router has closed the connection, i.e. not routed it to your localhost. Or do you see a connection attempt on the server?
Last edited by Strike0 (2012-06-16 12:46:31)
Offline
Get "Fing" for your phone (it's in the play store) and scan the network for your computer, then scan the computer for open ports. If you can't see the computer, maybe the router blocks inter-device communication.
Offline
Also, post the output of your /var/log/auth.log file or at least the relevant lines that appear when you attempt to connect. The initial exchange looks good, but why it's dying after that is a mystery.
Have you run a pacman -Syu recently?
He who has no .plan has small finger.
~Confucius on UNIX.
Offline