$SSH_CONNECTION Does not display the IP addresses or port port numbers of ssh cnnections [closed]

Clash Royale CLAN TAG#URR8PPP
up vote
-3
down vote
favorite
echo $SSH_CONNECTION does not display anything on the SSH server. I use my laptop to connect to my server using a key-less SSH setup. After SSHing to my server, if I run echo $SSH_CONNECTION in a terminal on the server from the machine itself I'm supposed to see the IP address and port numbers of my remote and local server client, however nothing is displayed. I am wondering if anyone can guide me in fixing this issue?
I have Ubuntu 16.04 running on both machines.
linux ubuntu ssh environment-variables openssh
closed as unclear what you're asking by G-Man, Michael Homer, Ipor Sircer, Stephen Rauch, Anthony Geoghegan Oct 23 '17 at 8:43
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
-3
down vote
favorite
echo $SSH_CONNECTION does not display anything on the SSH server. I use my laptop to connect to my server using a key-less SSH setup. After SSHing to my server, if I run echo $SSH_CONNECTION in a terminal on the server from the machine itself I'm supposed to see the IP address and port numbers of my remote and local server client, however nothing is displayed. I am wondering if anyone can guide me in fixing this issue?
I have Ubuntu 16.04 running on both machines.
linux ubuntu ssh environment-variables openssh
closed as unclear what you're asking by G-Man, Michael Homer, Ipor Sircer, Stephen Rauch, Anthony Geoghegan Oct 23 '17 at 8:43
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
3
Perhaps you can edit to be clearer here, but I think that sounds normal if you're saying thatSSH_CONNECTIONis only set from within the SSH session. If that's not what you're saying then edit to break it down into what you see, where, and what you expected.
â Michael Homer
Oct 23 '17 at 0:39
askubuntu.com/questions/608956/⦠Please refer to this link. this will help you
â Rishabh Bahukhandi
Oct 23 '17 at 5:29
add a comment |Â
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
echo $SSH_CONNECTION does not display anything on the SSH server. I use my laptop to connect to my server using a key-less SSH setup. After SSHing to my server, if I run echo $SSH_CONNECTION in a terminal on the server from the machine itself I'm supposed to see the IP address and port numbers of my remote and local server client, however nothing is displayed. I am wondering if anyone can guide me in fixing this issue?
I have Ubuntu 16.04 running on both machines.
linux ubuntu ssh environment-variables openssh
echo $SSH_CONNECTION does not display anything on the SSH server. I use my laptop to connect to my server using a key-less SSH setup. After SSHing to my server, if I run echo $SSH_CONNECTION in a terminal on the server from the machine itself I'm supposed to see the IP address and port numbers of my remote and local server client, however nothing is displayed. I am wondering if anyone can guide me in fixing this issue?
I have Ubuntu 16.04 running on both machines.
linux ubuntu ssh environment-variables openssh
edited Oct 23 '17 at 2:10
asked Oct 23 '17 at 0:37
Fuad Shamieh
12
12
closed as unclear what you're asking by G-Man, Michael Homer, Ipor Sircer, Stephen Rauch, Anthony Geoghegan Oct 23 '17 at 8:43
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by G-Man, Michael Homer, Ipor Sircer, Stephen Rauch, Anthony Geoghegan Oct 23 '17 at 8:43
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
3
Perhaps you can edit to be clearer here, but I think that sounds normal if you're saying thatSSH_CONNECTIONis only set from within the SSH session. If that's not what you're saying then edit to break it down into what you see, where, and what you expected.
â Michael Homer
Oct 23 '17 at 0:39
askubuntu.com/questions/608956/⦠Please refer to this link. this will help you
â Rishabh Bahukhandi
Oct 23 '17 at 5:29
add a comment |Â
3
Perhaps you can edit to be clearer here, but I think that sounds normal if you're saying thatSSH_CONNECTIONis only set from within the SSH session. If that's not what you're saying then edit to break it down into what you see, where, and what you expected.
â Michael Homer
Oct 23 '17 at 0:39
askubuntu.com/questions/608956/⦠Please refer to this link. this will help you
â Rishabh Bahukhandi
Oct 23 '17 at 5:29
3
3
Perhaps you can edit to be clearer here, but I think that sounds normal if you're saying that
SSH_CONNECTION is only set from within the SSH session. If that's not what you're saying then edit to break it down into what you see, where, and what you expected.â Michael Homer
Oct 23 '17 at 0:39
Perhaps you can edit to be clearer here, but I think that sounds normal if you're saying that
SSH_CONNECTION is only set from within the SSH session. If that's not what you're saying then edit to break it down into what you see, where, and what you expected.â Michael Homer
Oct 23 '17 at 0:39
askubuntu.com/questions/608956/⦠Please refer to this link. this will help you
â Rishabh Bahukhandi
Oct 23 '17 at 5:29
askubuntu.com/questions/608956/⦠Please refer to this link. this will help you
â Rishabh Bahukhandi
Oct 23 '17 at 5:29
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The SSH_CONNECTION environment variable will be set in the SSH session. It will not be set for any other process on the SSH server than for those started from the SSH connection from the client.
If you are logged in directly on the SSH server (on the physical machine, not through SSH), and type echo $SSH_CONNECTION, then I'm expecting that to output nothing.
So, logging in with SSH and then printing the value of $SSH_CONNECTION ought to look something like
[client] $ ssh username@server.example.com
[server] $ echo "$SSH_CONNECTION"
xxx.xxx.xxx.xxx nnnnn yyy.yyy.yyy.yyy 22
Where x is your client's IP address, n is the port used on the client, and y is the server's IP address.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The SSH_CONNECTION environment variable will be set in the SSH session. It will not be set for any other process on the SSH server than for those started from the SSH connection from the client.
If you are logged in directly on the SSH server (on the physical machine, not through SSH), and type echo $SSH_CONNECTION, then I'm expecting that to output nothing.
So, logging in with SSH and then printing the value of $SSH_CONNECTION ought to look something like
[client] $ ssh username@server.example.com
[server] $ echo "$SSH_CONNECTION"
xxx.xxx.xxx.xxx nnnnn yyy.yyy.yyy.yyy 22
Where x is your client's IP address, n is the port used on the client, and y is the server's IP address.
add a comment |Â
up vote
1
down vote
accepted
The SSH_CONNECTION environment variable will be set in the SSH session. It will not be set for any other process on the SSH server than for those started from the SSH connection from the client.
If you are logged in directly on the SSH server (on the physical machine, not through SSH), and type echo $SSH_CONNECTION, then I'm expecting that to output nothing.
So, logging in with SSH and then printing the value of $SSH_CONNECTION ought to look something like
[client] $ ssh username@server.example.com
[server] $ echo "$SSH_CONNECTION"
xxx.xxx.xxx.xxx nnnnn yyy.yyy.yyy.yyy 22
Where x is your client's IP address, n is the port used on the client, and y is the server's IP address.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The SSH_CONNECTION environment variable will be set in the SSH session. It will not be set for any other process on the SSH server than for those started from the SSH connection from the client.
If you are logged in directly on the SSH server (on the physical machine, not through SSH), and type echo $SSH_CONNECTION, then I'm expecting that to output nothing.
So, logging in with SSH and then printing the value of $SSH_CONNECTION ought to look something like
[client] $ ssh username@server.example.com
[server] $ echo "$SSH_CONNECTION"
xxx.xxx.xxx.xxx nnnnn yyy.yyy.yyy.yyy 22
Where x is your client's IP address, n is the port used on the client, and y is the server's IP address.
The SSH_CONNECTION environment variable will be set in the SSH session. It will not be set for any other process on the SSH server than for those started from the SSH connection from the client.
If you are logged in directly on the SSH server (on the physical machine, not through SSH), and type echo $SSH_CONNECTION, then I'm expecting that to output nothing.
So, logging in with SSH and then printing the value of $SSH_CONNECTION ought to look something like
[client] $ ssh username@server.example.com
[server] $ echo "$SSH_CONNECTION"
xxx.xxx.xxx.xxx nnnnn yyy.yyy.yyy.yyy 22
Where x is your client's IP address, n is the port used on the client, and y is the server's IP address.
answered Oct 23 '17 at 5:26
Kusalananda
105k14209326
105k14209326
add a comment |Â
add a comment |Â
3
Perhaps you can edit to be clearer here, but I think that sounds normal if you're saying that
SSH_CONNECTIONis only set from within the SSH session. If that's not what you're saying then edit to break it down into what you see, where, and what you expected.â Michael Homer
Oct 23 '17 at 0:39
askubuntu.com/questions/608956/⦠Please refer to this link. this will help you
â Rishabh Bahukhandi
Oct 23 '17 at 5:29