Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nxssh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Алексей Аляев
nxssh
Commits
e1892b03
Commit
e1892b03
authored
8 years ago
by
Stas Korobeynikov
Committed by
Pavel Vainerman
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add nxmode enabled param use
parent
1f8b3300
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
sshconnect.c
sshconnect.c
+20
-2
No files found.
sshconnect.c
View file @
e1892b03
...
...
@@ -70,6 +70,8 @@
#undef TEST
#undef DEBUG
#define HTTP_MAXHDRS 64
char
*
client_version_string
=
NULL
;
char
*
server_version_string
=
NULL
;
Key
*
previous_host_key
=
NULL
;
...
...
@@ -794,15 +796,28 @@ ssh_connect_direct(const char *host, struct addrinfo *aitop,
memcpy
(
hostaddr
,
ai
->
ai_addr
,
ai
->
ai_addrlen
);
break
;
}
else
{
if
(
NxAdminModeEnabled
)
{
fprintf
(
stdout
,
"NX> 207 nxssh: connect to address %s port %s: %s
\n
"
,
sockaddr_ntop
(
ai
->
ai_addr
,
ai
->
ai_addrlen
),
strport
,
strerror
(
errno
));
}
else
if
(
NxAuthOnlyModeEnabled
)
{
fprintf
(
stdout
,
"NX> 207 nxssh: connect to address %s port %s: %s"
,
sockaddr_ntop
(
ai
->
ai_addr
,
ai
->
ai_addrlen
),
strport
,
strerror
(
errno
));
}
else
{
debug
(
"connect to address %s port %s: %s"
,
ntop
,
strport
,
strerror
(
errno
));
close
(
sock
);
sock
=
-
1
;
}
}
if
(
sock
!=
-
1
)
}
if
(
sock
!=
-
1
)
{
if
(
NxModeEnabled
)
logit
(
"NX> 200 Connected to address: %.200s on port: %.200s"
,
ntop
,
strport
);
break
;
/* Successful connection. */
}
}
/* Return failure if we didn't get a successful connection. */
if
(
sock
==
-
1
)
{
...
...
@@ -1319,7 +1334,7 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
" found in DNS.
\n
"
);
}
snprintf
(
msg
,
sizeof
(
msg
),
"The authenticity of host '%.200s (%s)' can't be "
"
NX> 211
The authenticity of host '%.200s (%s)' can't be "
"established%s
\n
"
"%s key fingerprint is %s.%s%s
\n
%s"
"Are you sure you want to continue connecting "
...
...
@@ -1440,6 +1455,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
warn_changed_key
(
host_key
);
error
(
"Add correct host key in %.100s to get rid of this message."
,
user_hostfiles
[
0
]);
if
(
NxModeEnabled
||
NxAdminModeEnabled
)
{
error
(
"NX> 209 Remote host identification has changed."
);
}
error
(
"Offending %s key in %s:%lu"
,
key_type
(
host_found
->
key
),
host_found
->
file
,
host_found
->
line
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment