[ https://issues.apache.org/jira/browse/SSHD-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167649#comment-17167649 ]
Lyor Goldstein edited comment on SSHD-1046 at 7/30/20, 5:55 AM: ---------------------------------------------------------------- Please use dev@mina.apache.org mailing list for such questions... That being said, the answer is in the Javadoc {code:java} /** * @return the socket address of remote peer. */ SocketAddress getRemoteAddress(); /** * @return the socket address of local machine which is associated with this session. */ SocketAddress getLocalAddress(); {code} was (Author: lgoldstein): Please use dev@mina.apache.org mailing list for such questions... > Getting wrong IP in session > --------------------------- > > Key: SSHD-1046 > URL: https://issues.apache.org/jira/browse/SSHD-1046 > Project: MINA SSHD > Issue Type: Question > Reporter: Sandeep > Priority: Major > > Hi Team, this is small query I have : > On My VM by using ifconfig: I get vm IP as *10.15.101.71* > > But in sftpSubsystem when I try below code I got *10.2.116.84* > > {code:java} > ServerSession session = getServerSession(); > InetSocketAddress addr = (InetSocketAddress) session.getRemoteAddress(); > String hostIP = addr.getAddress().getHostAddress(); > System.out.println("ip:"+hostIP ) > {code} > > Output as : > ip: *10.2.116.84* > > *So can you help me to find the details* > # why am getting this new ip which is not exit in our intranet > # What is different between *session.getRemoteAddress()* vs > *session.getLocalAddress()* methods? > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org