| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
07-21-2011, 12:47 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Rep:
|
why does ssh to my server give me a blank shell?
Good morning!
This is my first attempt at ssh and I ran into the following problem - tried to find an answer and maybe it is an obvious one but haven't found it yet - :
i can log into my server using ssh (both from windows via Putty and from my puredyne computer using the terminal), but once I've logged in there is only a blank terminal that doesn't respond to commands. It is as if I had gotten up a notebook where I can write stuff, but the computer doesnt give a hoot what it is! : )
Ideas? Am i missing something?
thx for any help! 
|
|
|
|
07-21-2011, 01:20 AM
|
#2
|
|
LQ Newbie
Registered: Jul 2011
Posts: 7
Rep: 
|
do you have a shell(korn, bash, ksh) defined?
|
|
|
|
07-21-2011, 09:53 AM
|
#3
|
|
LQ Newbie
Registered: Oct 2010
Location: Missouri
Distribution: CentOS, Gentoo
Posts: 17
Rep:
|
It is possible your 'sshd' is not running properly. This can usually be fixed by restarting the 'sshd' service via the commands:
#sudo /etc/init.d/ssh stop
#sudo /etc/init.d/ssh start
When did the problem start and what steps have you taken already?
|
|
|
|
07-22-2011, 07:55 AM
|
#4
|
|
LQ Newbie
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Original Poster
Rep:
|
terminal
Thanks for the answers!
on my server I have bash. I think puredyne uses bash too - could it make a difference?
I am gonna try the other suggestion once I get to my server, which is remote... 
|
|
|
|
07-22-2011, 08:34 AM
|
#5
|
|
LQ Newbie
Registered: Oct 2010
Location: Missouri
Distribution: CentOS, Gentoo
Posts: 17
Rep:
|
To further your investigation, you may want to look at some documentation on how to configure the ssh.conf file to ensure it is configured properly. There are some links below. This is assuming you are trying to access a Ubuntu server. It should make no difference if you are running different shells on each machine. SSH is just a bit smarter 'dumb terminal'. A gateway application for remote management of servers. It will present you with the shell the remote server is running.
http://www.cyberciti.biz/tips/howot-...sh-server.html
https://help.ubuntu.com/community/SS...SH/Configuring
https://help.ubuntu.com/8.04/serverg...sh-server.html
I hope this helps you get it fixed. My guess if going to be a bad config file. Double check your settings and as a last resort remove the packages and reinstall them.
Thanks!
Last edited by Jadedkill; 07-22-2011 at 08:38 AM.
|
|
|
|
07-22-2011, 09:10 AM
|
#6
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
Quote:
Originally Posted by Jadedkill
It will present you with the shell the remote server is running.
|
Should it not rather present you with the shell configured for the user you have just logged in as, as defined by the 7th field of their entry in /etc/passwd or /bin/sh by default.
|
|
|
|
07-22-2011, 03:46 PM
|
#7
|
|
LQ Newbie
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Original Poster
Rep:
|
gnyrfta
Thanks loads for the answers! I will get to my desktop server tomorrow evening and then I can check out the sshd config file and the other suggestions!
|
|
|
|
07-24-2011, 10:29 AM
|
#8
|
|
LQ Newbie
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Original Poster
Rep:
|
changed stuff
Ok, so now I finally got to my server today sunday, and I looked through the sshd_config file again. I realized that "AllowUsers" had been set to "username" instead of "username@ip#". I wasn't sure if this was ok, so i decided to comment out AllowUsers, since the default is that all users are allowed login.
I set the file to chmod 755, which it already was, but after i chmoded it, it showed green in the terminal, which I optimistically take as a good sign.
I set my firewall ufw to allow port 22.
Now I'm going home to try to access the server again.. will give an update on how that goes.
Ps. https://calomel.org/openssh.html is also a pretty good info page on ssh Ds.
|
|
|
|
07-24-2011, 10:30 AM
|
#9
|
|
LQ Newbie
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Original Poster
Rep:
|
restar
and I started and restarted ssh as suggested - thx!
|
|
|
|
07-24-2011, 10:53 AM
|
#10
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
Does that mean it's all working for you now?
Threads can be marked SOLVED via the Thread Tools menu.
|
|
|
|
07-24-2011, 03:53 PM
|
#11
|
|
LQ Newbie
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Original Poster
Rep:
|
no go
Got home, tried to connect with ssh and still get the same result.
This is my sshd_config file on the server computer(which runs ubuntu):
Code:
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
Banner /etc/issue
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
AllowTcpForwarding yes
|
|
|
|
07-24-2011, 04:00 PM
|
#12
|
|
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,314
|
Is there any difference whether you enter the correct or a wrong password by intention? If you enter any command in such a session (i.e. blindly something like ls) do you get any output? You can run ssh it with -vvv to get verbose output of the connection.
|
|
|
|
07-25-2011, 01:19 AM
|
#13
|
|
LQ Newbie
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Original Poster
Rep:
|
no password asked for
when i write ssh "hostuser@ip#" the cursor jumps down a step, and upon entering commands such as ls it doesnt give any response. Im not required to be root. Neither does anything different happen if i enter a random ip# instead of my own.
After a minute or two, i get:
ssh: connect to host ip# port 22: Connection timed out
zsh: exit 255 sudo ssh david@ip#
|
|
|
|
07-25-2011, 01:28 AM
|
#14
|
|
LQ Newbie
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Original Poster
Rep:
|
ssh -vvv
on using -vvv the process gets hung up on "Connecting to ip# port 22"
I'll see if I can try a friends computer and see if its just my connection...
Internet isn't a problem though, so it would be weird?
|
|
|
|
07-25-2011, 04:07 AM
|
#15
|
|
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,314
|
Then you don’t have a connection at all, and not a blank screen because of any shell setting. Even with putty you would get the question for your password otherwise. Is there any firewall on port 22 on the target machine?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:37 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|