LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-21-2011, 01:47 AM   #1
gnyrfta
LQ Newbie
 
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Blog Entries: 4

Rep: Reputation: 0
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!
 
Old 07-21-2011, 02:20 AM   #2
leenucks
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Rep: Reputation: Disabled
do you have a shell(korn, bash, ksh) defined?
 
Old 07-21-2011, 10:53 AM   #3
Jadedkill
LQ Newbie
 
Registered: Oct 2010
Location: Missouri
Distribution: CentOS, Gentoo
Posts: 17

Rep: Reputation: 0
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?
 
Old 07-22-2011, 08:55 AM   #4
gnyrfta
LQ Newbie
 
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Blog Entries: 4

Original Poster
Rep: Reputation: 0
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...
 
Old 07-22-2011, 09:34 AM   #5
Jadedkill
LQ Newbie
 
Registered: Oct 2010
Location: Missouri
Distribution: CentOS, Gentoo
Posts: 17

Rep: Reputation: 0
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 09:38 AM.
 
Old 07-22-2011, 10:10 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Quote:
Originally Posted by Jadedkill View Post
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.
 
Old 07-22-2011, 04:46 PM   #7
gnyrfta
LQ Newbie
 
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Blog Entries: 4

Original Poster
Rep: Reputation: 0
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!
 
Old 07-24-2011, 11:29 AM   #8
gnyrfta
LQ Newbie
 
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Blog Entries: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 07-24-2011, 11:30 AM   #9
gnyrfta
LQ Newbie
 
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Blog Entries: 4

Original Poster
Rep: Reputation: 0
restar

and I started and restarted ssh as suggested - thx!
 
Old 07-24-2011, 11:53 AM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Does that mean it's all working for you now?

Threads can be marked SOLVED via the Thread Tools menu.
 
Old 07-24-2011, 04:53 PM   #11
gnyrfta
LQ Newbie
 
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Blog Entries: 4

Original Poster
Rep: Reputation: 0
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
 
Old 07-24-2011, 05:00 PM   #12
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,320

Rep: Reputation: 252Reputation: 252Reputation: 252
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.
 
Old 07-25-2011, 02:19 AM   #13
gnyrfta
LQ Newbie
 
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Blog Entries: 4

Original Poster
Rep: Reputation: 0
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#
 
Old 07-25-2011, 02:28 AM   #14
gnyrfta
LQ Newbie
 
Registered: Jan 2010
Location: Sweden
Distribution: Ubuntu
Posts: 14
Blog Entries: 4

Original Poster
Rep: Reputation: 0
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?
 
Old 07-25-2011, 05:07 AM   #15
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,320

Rep: Reputation: 252Reputation: 252Reputation: 252
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?
 
  


Reply

Tags
blank, ssh, terminal


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Give access to your server via ssh Syed Tarique Moin Linux - Networking 4 07-21-2011 11:06 AM
[SOLVED] ssh to Server from within a Shell Script devUnix Linux - Server 3 04-06-2011 03:22 PM
SSH tunnel server, no shell but still able to change pw? humbletech99 Linux - Security 4 05-08-2008 06:11 AM
Resume from suspend in Fedora 8 give blank screen cdhgee Linux - Hardware 2 12-07-2007 06:10 PM
Real VNC and TightVNC both give me a blank desktop me_failed_linux Linux - Newbie 3 10-13-2007 07:53 AM


All times are GMT -5. The time now is 07:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration