any status update on ssh server?
Hello I'm wondering if the devs have made any step forward on making ssh server to work?
No big announcements on ssh server yet. We know this is something that many users are waiting on and are looking at it. Stay tuned.
Big requisite to implementing the SSH server is #308
build 14352
Able to install and start ssh server via service ssh start. But cannot connect to it.
Results of running in debug mode
$ sudo /usr/sbin/sshd -d
debug1: sshd version OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type ECDSA
debug1: private host key: #2 type 3 ECDSA
debug1: private host key: #3 type 4 ED25519
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
Set /proc/self/oom_adj from 0 to -17
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7
debug1: inetd sockets after dupping: 3, 3
Connection from 127.0.0.1 port 51262 on 127.0.0.1 port 22
debug1: Client protocol version 2.0; client software version JSCH-0.1.52
debug1: no match: JSCH-0.1.52
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7
chroot("/var/run/sshd"): Function not implemented [preauth]
debug1: do_cleanup [preauth]
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: Killing privsep child 2149
debug1: audit_event: unhandled event 12
$
chroot("/var/run/sshd"): Function not implemented [preauth] Seems like something missing in the kernel
Actually changing UsePrivilegeSeparation to no in /etc/ssh/sshd_config fixed this issue, and I can fully connect to ssh server :fireworks:
Afff... I get:
$ sudo /usr/sbin/sshd -d
debug1: sshd version OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type ECDSA
debug1: private host key: #2 type 3 ECDSA
debug1: private host key: #3 type 4 ED25519
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
Set /proc/self/oom_adj from 0 to -17
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Invalid argument.
Already created the keys with sudo ssh-keygen -A seems I'am lacking some steps...
Probably the binding to IPv6 is the problem... dunno yet.
I can connect thanks to @dryks suggestion. However, I get: PTY allocation request failed on channel 0 so I get no shell at all.
@leon-pilot try edit /etc/ssh/sshd_config
#ListenAddress 0.0.0.0 => ListenAddress 0.0.0.0 remove the # sign
I can't login. I did the changes to /etc/ssh/sshd_config that @xyzith and @dreyks suggested. I use the same password as I use with sudo. I also changed to PubkeyAuthentication no.
pi@LENOVO5:~$ sudo service ssh start
* Starting OpenBSD Secure Shell server sshd [ OK ]
pi@LENOVO5:~$ ssh pi@localhost
pi@localhost's password:
Permission denied, please try again.
pi@localhost's password:
Permission denied, please try again.
[Update: It works now with Build 14361.]
To answer the original question around support for SSH, there have been some changes checked in to enable PTY, which should unblock SSH. The changes haven't made it yet to the release branch, but should soon. Stay tuned.
As of build 14361, with the right sshd configuration (as seen above), this is now working.
Which of the settings do you mean?
When did build 14361 get released?
Skickat från min iPhone
8 juni 2016 kl. 21:54 skrev Gabriel Garcia [email protected]:
As of build 14361, with the right sshd configuration (as seen above), this is now working.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
today or maybe yesterday. my laptop is rebooting now to install 14361
@Golab
ListenAddress 0.0.0.0
UsePrivilegeSeparation no
PasswordAuthentication yes
Can I in someway set it up so sshd starts when Windows boots up like auto start?
Skickat från min iPad
9 juni 2016 kl. 14:48 skrev Gabriel Garcia [email protected]:
@Golab
ListenAddress 0.0.0.0 UsePrivilegeSeparation no PasswordAuthentication yes — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I can only connect to the local sshd server when the bash window is open.
You may be able to do something with C:\Windows\System32\bash.exe, like starting /usr/sbin/sshd and waiting on it. I do not have a definitive answer at the moment.
@Golab - You can try adding the "bash.exe -c
@russalex could you please somehow change UsePrivilegeSeparation to no by default? OpenSSH does not work out of the box, until you change this option because preauth is not implemented.
@Garciat , @Golab
Configuration:
Made the changes you provided: ListenAddress 0.0.0.0 UsePrivilegeSeparation no PasswordAuthentication yes
Build: 14388.0
Behavior
Still no change in behavior, ssh server seems to behave as if password is wrong (it is not :)
[email protected]'s password: Permission denied, please try again.
Verbose output:
[email protected]'s password: debug3: packet_send2: adding 48 (len 61 padlen 19 extra_pad 64) debug2: we sent a password packet, wait for reply debug3: Received SSH2_MSG_IGNORE debug1: Authentications that can continue: gssapi-with-mic,password Permission denied, please try again.
Other observations: ssh server does print an error trying to start or restart it:
sudo service ssh start [sudo] password for waqarz: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
- Starting OpenBSD Secure Shell server sshd [ OK ]
This is a similar error as trying to start dbus service: https://github.com/Microsoft/BashOnWindows/issues/376, any relation?
All in all I am concluding that since @russalex commented its a known issue, it will be fixed eventually.
I'm wondering how do I setup so sshd starts when the computer boots up?
Skickat från min iPhone
17 juli 2016 kl. 10:48 skrev waqarz [email protected]:
@Garciat , @Golab
Configuration:
Made the changes you provided: ListenAddress 0.0.0.0 UsePrivilegeSeparation no PasswordAuthentication yes
Build: 14388.0
Behavior
Still no change in behavior, ssh server seems to behave as if password is wrong (it is not :)
[email protected]'s password: Permission denied, please try again.
Verbose output:
[email protected]'s password:
debug3: packet_send2: adding 48 (len 61 padlen 19 extra_pad 64) debug2: we sent a password packet, wait for reply debug3: Received SSH2_MSG_IGNORE debug1: Authentications that can continue: gssapi-with-mic,password Permission denied, please try again.Other observations: ssh server does print an error trying to start or restart it:
sudo service ssh start [sudo] password for waqarz: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
- Starting OpenBSD Secure Shell server sshd [ OK ]
This is a similar error as trying to start dbus service: #376, any relation?
All in all I am concluding that since @russalex commented its a known issue, it will be fixed eventually.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@Golab , unfortunately, it looks like Upstart is not working yet or at least on mine. But based on @sunilmut 's suggestion, you can pass a command to bash.exe with the -c option.
So you can do something like:
bash.exe -c "sudo service ssh start"
And then add that to startup. This will ask you for your password though. If you want to pass the password automatically, you can do like:
bash.exe -c "echo p@$$w0rD | sudo -S service ssh start"
But this is not secure.