problem with ssh -> authentication failed

I

Ice Man

Hi,

i have a very stupid and annoying problem;/ I wrote a simple script:


require 'rubygems'
require 'net/ssh'

Net::SSH.start('host',:username => 'user',:password => 'pass') do
|session|

shell=session.shell.open

shell.dir
shell.exit

$stdout.print shell.stdout while shell.stdout?
$stderr.puts "-- stderr: --"
$stderr.print shell.stderr while shell.stderr?

end


All the time I have the same error:

c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh.rb:195:in
`start': Net::SSH::AuthenticationFailed

I tried a lot of diffrent script with ssh, but all the time I have still
the same error

Any suggestions what's wrong ??

THX
 
B

Brian Candler

c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh.rb:195:in
`start': Net::SSH::AuthenticationFailed ...
Any suggestions what's wrong ??

I apologise for stating the obvious, but it looks like a wrong username
and/or password. Or it could be that there is something else at the
server side which is rejecting the connection, e.g. it's possible to
configure ssh accounts so they only accept connections from a particular
IP address, or so that they can only run certain commands (not shells).

Looking at sshd logs on the far side could help to determine the
problem. Even better, try running sshd in debug mode, bound to a
different port:

# sshd -d -p 99

This will stay in the foreground without forking, and show you the
processing of incoming connections. Add :port=>99 to your client of
course.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top