AnswerBun.com

How to keep the format of text unchanged when I open it by Nano over ssh

Super User Asked by VU THANH VINH on December 24, 2020

I’m running this command to ssh into a server and open a textfile

sudo ssh -i ~/key.pem [email protected] -t "sudo nano /path/to/a/file.py"

In the nano editor, I’m seeing the ‘newline’ has been truncated

from base64 import urlsafe_b64encode import hashlib import hmac from django.utils.encoding import smart_str import time from
django.conf import settings

How can I keep the same format as origin of the file

from base64 import urlsafe_b64encode
import hashlib
import hmac
from django.utils.encoding import smart_str
import time

If I ssh, then type the command open nano manually, the original content is correct as above

Thank you!

Edit: I tried -N, also -w options it didn’t work. At the very beginning the editor already show ‘modifed’ though I did nothing
https://i.stack.imgur.com/CmxWj.png

Add your own answers!

Related Questions

Create an installer for domain users

2  Asked on November 14, 2021 by shahar-weiss

       

hyperlink not change after deleting or insert the cell

2  Asked on November 14, 2021 by sumit-jain

 

Is there a way to compress exe files?

2  Asked on November 14, 2021

   

Mouse clicks suddenly stopped working in Ubuntu

14  Asked on November 12, 2021 by disgruntledgoat

   

Virtual CloneDrive hijacking USB drives

1  Asked on November 12, 2021 by ctech

       

IPv4 changes by itself

2  Asked on November 12, 2021 by longlife

     

VBA Code for filtering a column using Input Box

3  Asked on November 12, 2021 by dhivya-sethu

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP