I am trying to connect to my web host via ssh. I can do this on Windows using Putty without issue. However, if I run this on Linux, I receive a “permission denied” when I am prompted for my login and password. It’s obviously making some type of connection, otherwise it wouldn’t be prompting me for authentication.
I initially thought this was a firewall issue. I opened up port 22 and I even tried disabling the firewall altogether. However, I still received this error.
Online I have seen all kinds of resolutions, but not sure where to start first.
>
> I am trying to connect to my web host via ssh. I can do this on Windows
> using Putty without issue. However, if I run this on Linux, I receive a
> “permission denied” when I am prompted for my login and password. It’s
> obviously making some type of connection, otherwise it wouldn’t be
> prompting me for authentication.
>
> I initially thought this was a firewall issue. I opened up port 22 and
> I even tried disabling the firewall altogether. However, I still
> received this error.
>
> Online I have seen all kinds of resolutions, but not sure where to
> start first.
>
> I have openSuse 11.3 64-bit.
>
> Any other information I will be happy to provide.
>
are you sure you are asked for name and password when trying to login? if
you don’t specify a username for your SSH session, it will try to connect
using your user name of the present openSUSE session; and most likely that
isn’t the same user name you have at your webhost.
to login via SSH using a different user name, you have to type
“SSH <webhost username>@<webhost address>”
then it will ask you for the password that that username uses. otherwise
it’ll try to connect as your user name on your linux machine, which is
likely wrong.
> On Mon, 15 Aug 2011 20:36:02 +0530, imterpsfan2
> <imterpsfan2@no-mx.forums.opensuse.org> wrote:
>
>>
>> I am trying to connect to my web host via ssh. I can do this on Windows
>> using Putty without issue. However, if I run this on Linux, I receive a
>> “permission denied” when I am prompted for my login and password. It’s
>> obviously making some type of connection, otherwise it wouldn’t be
>> prompting me for authentication.
>>
>> I initially thought this was a firewall issue. I opened up port 22 and
>> I even tried disabling the firewall altogether. However, I still
>> received this error.
>>
>> Online I have seen all kinds of resolutions, but not sure where to
>> start first.
>>
>> I have openSuse 11.3 64-bit.
>>
>> Any other information I will be happy to provide.
>>
>
> are you sure you are asked for name and password when trying to login?
> if you don’t specify a username for your SSH session, it will try to
> connect using your user name of the present openSUSE session; and most
> likely that isn’t the same user name you have at your webhost.
>
> to login via SSH using a different user name, you have to type
>
> “SSH <webhost username>@<webhost address>”
>
> then it will ask you for the password that that username uses.
> otherwise it’ll try to connect as your user name on your linux machine,
> which is likely wrong.
>
sorry, that’s “ssh <webhost username>@<webhost address>” without capitals,
of course.
strange, on openSUSE, when i type just “ssh whatever.com”, it never asks
me for a user name, but tries to log in with the name i have in the
openSUSE session. don’t remember how that used to work on windows.
> strange, on openSUSE, when i type just “ssh whatever.com”, it never
> asks me for a user name, but tries to log in with the name i have in
> the openSUSE session. don’t remember how that used to work on windows.
It doesn’t work on windows; putty always prompts you.
On 08/15/2011 03:16 PM, Knurpht wrote:
>
> Code: --------------------
>
> ssh -l REMOTE_USER_NAMEREMOTE_HOST_OR_REMOTE_IP -p
> REMOTE_SSH_PORT]
>
> --------------------
>
> is the syntax I use most of the time.
>
>
> Yeah, and that works, but I personally find it easier (and easier for
> others to read) to do the format with the ‘@’ in the middle:
>
> ssh ab@mybox0.tld
I find it easier to put the user info in the ~/.ssh/config file - then I
can assign a name to it so I can just do:
ssh configname
And it connects with the user (and options) I want to default to for that
name.
But back to the OP’s question…
imterpsfan2: If you enter:
nslookup hostname.of.your.host
or
ping hostname.of.your.host
Do you get the expected IP address? What I’m wondering is if you’re
somehow connecting to a different host inadvertently.
I was able to connect using the username@webaddress syntax. The mistake I made was trying to use the ssh command the same way I had used Putty on Windows.
For start don`t use ssh on port 22 many crakheads are wondering the internet with their scanners for victims, try another port something like 9922; to adjust this, install the package yast-sshd via YaST be sure change port and to use only sshv2, be sure to open the port in the firewall(via advanced tab from firewall configuration, TCP port) and on the router if you own one(a.k.a port forwarding)
Second you did not mentioned if you try to login as normal user or root (root logins are disabled as a security measure as far as i know)…
Where I work we were getting constant hack attempts from bots all over the world, but when ssh was moved off port 22 they disappeared completely. So definitely change the port.
Portsentry or fail2ban are good tools against such attacks.
@ab: i did not know that, i used ssh under 11.0; ive always belived that suse devels will adjust this under next versions and make it a default setting.