camaropilot Posted September 22, 2017 Share Posted September 22, 2017 I've never really needed to SSH into my unraid box, however after having some duplicated folder issues, I attempted to SSH and could not. At first I found the keys were 0 bytes, so (following another forum post) I deleted the keys and restarted the box. Now when I tried to SSH, after "yes" to continue connecting, and inputting my password, I got "X11 forwarding request failed on channel 0." Per another search, I changed a couple of settings in /etc/ssh/sshd_config, particularly AddressFamily inet, however once saved, and system rebooted, it is changed back to #AddressFamily any. Any thoughts? unRAID OS 6.3.5 Quote Link to comment
Rhynri Posted September 22, 2017 Share Posted September 22, 2017 I'm no authority on the subject, but it seems you would need to work with /boot/config/ssh as per this thread. Hopefully this helps you get pointed in the right direction. I know you aren't the only person who has had trouble getting SSH settings to persist across boots. Quote Link to comment
gubbgnutten Posted September 22, 2017 Share Posted September 22, 2017 13 hours ago, camaropilot said: I got "X11 forwarding request failed on channel 0." How about just not making a request for X11 forwarding from the client? Quote Link to comment
camaropilot Posted September 22, 2017 Author Share Posted September 22, 2017 Rhynri, thank you for that thread, I'll explore that. Gubbgnutten, I don't even know what X11 forwarding is. All I did was "ssh user@towerIP" then input my password, just like I do for my Ubuntu servers, and my Raspberry Pi's. Quote Link to comment
Rhynri Posted September 22, 2017 Share Posted September 22, 2017 X11 forwarding means forwarding the GUI of an application to your local machine through the SSH connection. There is more info on what it is and how it's usually done here. You might be able to reverse-engineer some of those steps to figure out what setting is messing things up for you. Quote Link to comment
gubbgnutten Posted September 22, 2017 Share Posted September 22, 2017 Just suggesting to check the ssh configuration of the client first before starting to make random modifications to the server's configuration... Quote Link to comment
camaropilot Posted September 22, 2017 Author Share Posted September 22, 2017 7 minutes ago, Rhynri said: X11 forwarding means forwarding the GUI of an application to your local machine through the SSH connection. There is more info on what it is and how it's usually done here. You might be able to reverse-engineer some of those steps to figure out what setting is messing things up for you. Ahh, got it. All I normally use is terminal and the command line. Quote Link to comment
camaropilot Posted September 22, 2017 Author Share Posted September 22, 2017 1 minute ago, gubbgnutten said: Just suggesting to check the ssh configuration of the client first before starting to make random modifications to the server's configuration... Okay I'll look into that. I didn't think it would be a client issue since I am able to SSH from my Ubuntu desktop to other computers without any problem. Quote Link to comment
Delarius Posted September 22, 2017 Share Posted September 22, 2017 (edited) Hi, There's a few possible causes for this. Unless you've manually created another 'user' not a GUI user either, but actually created one via the shell - you'll probably need to use root as the user. To get more information about the issue, try ssh in verbose mode - it might give you a hint as to what the issue is: ssh -v root@servername I'd guess that you're using a user declared via the GUI which will typically result in a missing /home/<username> directory - that'll cause this problem. You can try to suppress the X11 forwarding by logging in like: ssh -x root@servername For whichever affected user (assuming you've gone into the shell and added the user correctly via useradd command) you could also check their ~/.ssh/config file. It may have the following entries: ForwardX11 yes ForwardX11Trusted yes You may want these to be set to 'no' - unless you are actually intending to forward X11 for the specific user. It could also be an issue with your /etc/ssh/sshd_config file but if you haven't fiddled with it (and note that changes will be reset on reboot) then that seems unlikely. If you do mess with this file and want to test if it worked, you'll need to restart the sshd service. We're going to restart it using the rc.d entry as opposed to the /sbin/ (is it bin?) entry. I'm noy at my machine right now but it'll be something like: /etc/rc.d/rc.sshd restart Then you can test your configuration (note this will drop any connected ssh sessions - so have console available if things go awry.) To make the changes permanent, as Rhynri above suggested - you'll need to look into /boot/config/ssh somewhere. To make it easier to find, obviously not a bad idea to just grep for something in that dir - something like: grep -i X11forwarding /boot/config/ssh/* This should reveal the specific file you'd need to edit - I'd be sure to make a backup somewhere first. I can't test right now but that should likely point you to the file that's preserved across reboots that initially creates the ram based file at /etc/ssh/sshd_config Hopefully this gets you on the right track, Del Edited September 22, 2017 by Delarius fixing words Quote Link to comment
gubbgnutten Posted September 22, 2017 Share Posted September 22, 2017 6 hours ago, camaropilot said: Okay I'll look into that. I didn't think it would be a client issue since I am able to SSH from my Ubuntu desktop to other computers without any problem. You are trying to log in as root on the unRAID server, right? Other users will get disconnected immediately in a default environment. 1 Quote Link to comment
camaropilot Posted September 23, 2017 Author Share Posted September 23, 2017 Delarius and gubbgnutten, much appreciation to you both. Yes I was trying to use my other user, not root. I had not created this user on command line, but in unRAID users. And, indeed, using verbose mode helped a lot, showing me that I was getting disconnected immediately. I was thinking that I had read somewhere that you could not SSH with root, apparently I was mistaken. I am now able to SSH using root! Again, thanks to all for your help. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.